:root {
    --primary: #e3202a;
    --primary-light: rgba(227, 32, 42, 0.1);
    --primary-dark: #c11a22;
    --secondary: #f9d044;
    --dark: #1a1a1a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Principal */
.login-container {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    position: relative;
}

@media (min-width: 1024px) {
    .login-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

/* Background Section */
.login-background {
    display: none;
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--dark) 100%);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .login-background {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.background-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.brand-showcase {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: float 3s ease-in-out infinite;
}

.brand-logo i {
    font-size: 3rem;
    color: white;
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
    line-height: 1.6;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Login Card */
.login-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    position: relative;
}

@media (min-width: 768px) {
    .login-card {
        padding: 3rem;
    }
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .mobile-logo {
        display: none;
    }
}

.mobile-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.mobile-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
}

.mobile-logo-text span {
    color: var(--primary);
}

.form-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

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

/* Form */
.login-form {
    space-y: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-900);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error {
    border-color: var(--error);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    transition: var(--transition);
    pointer-events: none;
}

.form-input:focus ~ .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition-fast);
}

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

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--error);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox {
    position: relative;
    width: 20px;
    height: 20px;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox:hover .checkmark {
    border-color: var(--primary);
}

.checkbox input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-700);
}

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

.forgot-link:hover {
    color: var(--primary-dark);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    transition: var(--transition);
}

.button-icon {
    transition: var(--transition);
}

.submit-button:hover:not(:disabled) .button-icon {
    transform: translateX(2px);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floating Elements */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.05;
    animation: float-random 8s infinite ease-in-out;
}

.shape:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    bottom: 10%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes float-random {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(90deg); }
    50% { transform: translate(-5px, 10px) rotate(180deg); }
    75% { transform: translate(-10px, -5px) rotate(270deg); }
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .checkbox-wrapper {
        justify-content: center;
    }
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--success);
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px var(--success);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px var(--success);
    }
}

.login-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 12px;
    color: var(--white);
    text-align: left;
    justify-content: left;  
    display: flex;
    align-items: left;
    justify-content: left;
}

.login-footer a {           
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.login-footer a:hover {
    color: var(--gray-600);
}