

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
    overflow-x: hidden;
    background: linear-gradient(135deg, #0f0f0f 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    position: relative;
}

/* Elementos geométricos de fondo */
.geometric-circle {
    position: absolute;
    top: 15%;
    right: 8%;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: rotateCircle 25s linear infinite;
    z-index: 1;
}

.geometric-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotateCircle 20s linear infinite reverse;
}

.geometric-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotateCircle 15s linear infinite;
}

.geometric-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 30.5%, rgba(255, 255, 255, 0.02) 31%, transparent 31.5%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.02) 30.5%, rgba(255, 255, 255, 0.02) 31%, transparent 31.5%);
    background-size: 80px 80px;
    opacity: 0.4;
    z-index: 1;
}

@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Container principal */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.15),
        0 16px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 650px;
    padding: 2.5rem 4rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 450px;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(228, 185, 72, 0.5), transparent);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del login */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    margin-bottom: 1rem;
    
}

.main-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 32px rgba(212, 175, 55, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

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

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
    background: var(--logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 400;
    font-style: italic;
}

/* Formulario */
.login-form {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: end;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    display: block;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(250, 250, 250, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-colorr);
    background: white;
    box-shadow: 
        0 0 0 4px rgba(228, 185, 72, 0.1),
        0 8px 32px rgba(228, 185, 72, 0.15);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--text-color);
    opacity: 0.7;
}

/* Botón principal */
.btn-login {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    padding: 1.1rem 2rem;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(228, 185, 72, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(228, 185, 72, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Enlaces */
.login-links {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: var(--primary-colorr);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-colorr);
    transition: width 0.3s ease;
}

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

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary-colorr);
    transform: translateX(-3px);
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
}

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

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

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

/* Loading state */
.btn-login.loading {
    position: relative;
    color: transparent;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 1rem;
    }
    
    .login-container {
        padding: 2rem;
        max-width: 100%;
        min-height: auto;
    }
    
    .login-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .geometric-circle {
        width: 250px;
        height: 250px;
        top: 10%;
        right: 5%;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .main-logo {
        max-width: 80px;
    }
    
    .login-title {
        font-size: 1.6rem;
    }
    
    .geometric-lines {
        background-size: 40px 40px;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states mejorados */
.btn-login:focus-visible,
.forgot-link:focus-visible,
.back-link:focus-visible {
    outline: 2px solid var(--primary-colorr);
    outline-offset: 2px;
}

/* Show Visibility */

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 68%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: color 0.2s ease;
    z-index: 2;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-colorr);
    background: rgba(228, 185, 72, 0.1);
}

.password-toggle .material-symbols-outlined {
    font-size: 1.2rem;
}

