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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.video-panel {
    flex: 0.5;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -170px;
}

.video-panel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.login-container {
    flex: 1;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 56px 48px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 15px rgba(0, 0, 0, 0.03),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    display: inline-block;
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease-out, logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.brand-logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-header h1 {
    font-size: 32px;
    font-weight: 500;
    color: #000000;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    animation: fadeIn 0.6s ease-out 0.1s backwards;    background: linear-gradient(90deg, #000 0%, #333 50%, #000 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.6s ease-out 0.1s backwards, shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }}

.login-header .subtitle {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    max-width: 360px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form {
    margin-bottom: 0;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.validation-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.input-group.valid .validation-icon,
.input-group.invalid .validation-icon {
    opacity: 1;
}

.input-group.valid input {
    border-color: #10b981;
    padding-right: 48px;
}

.input-group.invalid input {
    border-color: #ef4444;
    padding-right: 48px;
}

.password-group .validation-icon {
    right: 50px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.input-group input {
    width: 100%;
    padding: 16px 18px 16px 48px;
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    color: #000000;
    font-size: 15px;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    font-weight: 400;
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px 20px;
}

.input-group input[type="text"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
}

.input-group input[type="password"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>');
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #000000;
    transition: transform 0.2s ease;
}

.remember-me:hover input[type="checkbox"] {
    transform: scale(1.1);
}

.remember-me span {
    user-select: none;
}

.forgot-password-link {
    text-align: center;
    margin-top: 20px;
}

.forgot-password-link a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.forgot-password-link a:hover {
    color: #000;
}

.forgot-password-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s ease;
}

.forgot-password-link a:hover::after {
    width: 100%;
}
}

.input-group input:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}

.input-group input:focus {
    outline: none;
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.input-group input::placeholder {
    color: #b3b3b3;
}

.login-btn {
    width: 100%;
    padding: 16px;
    margin-top: 32px;
    background: #000000;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.error-message {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1.5px solid #feb2b2;
    color: #c53030;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.error-message i {
    display: none;
}

.info-message {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px solid #bfdbfe;
    color: #1e40af;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.info-message i {
    display: none;
}

.login-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.login-footer .version {
    font-size: 12px;
    color: #999999;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.login-footer .copyright {
    font-size: 11px;
    color: #b3b3b3;
}

@media (max-width: 968px) {
    .video-panel {
        display: none;
    }
    
    .login-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-box {
        padding: 32px 24px;
    }
    
    .login-footer {
        margin-top: 32px;
        padding-top: 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}

.login-footer .version {
    text-transform: uppercase;
}

/* Modal Recuperar Contraseña */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 440px;
    width: 90%;
    position: relative;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #fafafa;
    border-radius: 12px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 0 0 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.modal-form {
    margin: 0;
}

.modal-form .input-group {
    margin-bottom: 24px;
}

.modal-form input[type="email"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>');
}

.modal-btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.modal-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.modal-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.modal-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@media (max-width: 968px) {
    .modal-content {
        padding: 32px 24px;
    }
}

/* Developer Credit */
.developer-credit {
    position: fixed;
    bottom: 20px;
    right: 24px;
    z-index: 10000;
}

.developer-credit a {
    font-size: 12px;
    color: #c0c0c0;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.developer-credit a:hover {
    color: #999;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.theme-toggle:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

body.dark-mode .login-box {
    background: #1f1f1f;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 10px 15px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .login-header h1,
body.dark-mode .modal-header h2 {
    color: #ffffff;
}

body.dark-mode .login-header .subtitle,
body.dark-mode .modal-subtitle {
    color: #999;
}

body.dark-mode .brand-logo rect {
    fill: #ffffff;
}

body.dark-mode .brand-logo path {
    stroke: #000000;
}

body.dark-mode .input-group input {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #ffffff;
}

body.dark-mode .input-group input::placeholder {
    color: #666;
}

body.dark-mode .input-group input:focus {
    border-color: #555;
    background: #2f2f2f;
}

body.dark-mode .login-btn,
body.dark-mode .modal-btn {
    background: #ffffff;
    color: #000000;
}

body.dark-mode .login-btn:hover,
body.dark-mode .modal-btn:hover {
    background: #f0f0f0;
}

body.dark-mode .remember-me,
body.dark-mode .forgot-password-link a {
    color: #999;
}

body.dark-mode .forgot-password-link a:hover {
    color: #fff;
}

body.dark-mode .forgot-password-link a::after {
    background: #ffffff;
}

body.dark-mode .login-footer {
    border-top-color: #2a2a2a;
}

body.dark-mode .login-footer .version,
body.dark-mode .login-footer .copyright {
    color: #666;
}

body.dark-mode .theme-toggle {
    color: #999;
}

body.dark-mode .theme-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-content {
    background: #1f1f1f;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-icon {
    background: #2a2a2a;
}

body.dark-mode .modal-close:hover {
    background: #2a2a2a;
}

body.dark-mode .error-message {
    background: #2a1a1a;
    color: #ff6b6b;
    border-color: #3a2a2a;
}

body.dark-mode .info-message {
    background: #1a2a2a;
    color: #4dabf7;
    border-color: #2a3a3a;
}

