/* Reset y fuentes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de colores ACAMEDI */
    --color-primary: #000c18;
    --color-background: #ffffff;
    --color-secondary: #e8f0f9;
    --color-accent: #1a3c66;
    --color-text: #0d2847;
    --color-heading: #000000;
    --color-hover: #64ffda;

    /* Colores médicos complementarios */
    --color-medical-blue: #2c5aa0;
    --color-medical-light: #4a90e2;
    --color-success: #28a745;
    --color-error: #dc3545;
    --color-warning: #ffc107;
}

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-accent) 50%,
        var(--color-medical-blue) 100%
    );
    min-height: 100vh;
    overflow-x: hidden;
}

/* Contenedor principal */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Fondo animado */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 25s infinite linear;
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: var(--color-hover);
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 180px;
    height: 180px;
    background: var(--color-secondary);
    top: 60%;
    left: 75%;
    animation-delay: -8s;
}

.shape-3 {
    width: 90px;
    height: 90px;
    background: var(--color-hover);
    top: 75%;
    left: 15%;
    animation-delay: -15s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: var(--color-secondary);
    top: 20%;
    left: 70%;
    animation-delay: -20s;
}

.shape-5 {
    width: 200px;
    height: 200px;
    background: var(--color-hover);
    top: 45%;
    left: 55%;
    animation-delay: -12s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-120px) rotate(180deg);
    }
    100% {
        transform: translateY(0px) rotate(360deg);
    }
}

/* Wrapper principal */
.login-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(0, 12, 24, 0.3);
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    min-height: 650px;
    border: 1px solid rgba(26, 60, 102, 0.1);
}

/* Panel de información */
.info-panel {
    flex: 1;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-accent) 50%,
        var(--color-medical-blue) 100%
    );
    color: var(--color-background);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.info-panel::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(100, 255, 218, 0.1) 0%,
        transparent 70%
    );
    animation: rotate 30s linear infinite;
}

.info-panel::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: var(--color-hover);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.15;
    }
}

.info-content {
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.logo i {
    font-size: 3rem;
    margin-right: 15px;
    color: var(--color-hover);
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.05);
    }
}

.logo h1 {
    font-family: "Glegoo", serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.welcome-text h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--color-background);
}

.welcome-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 40px;
    color: var(--color-secondary);
}

.features {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    opacity: 0.9;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.feature:hover {
    opacity: 1;
    transform: translateX(5px);
}

.feature i {
    font-size: 1.4rem;
    margin-right: 20px;
    color: var(--color-hover);
    width: 25px;
    text-align: center;
}

.medical-quote {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--color-hover);
    position: relative;
}

.medical-quote i {
    font-size: 1.5rem;
    color: var(--color-hover);
    margin-bottom: 10px;
}

.medical-quote p {
    font-style: italic;
    font-size: 1rem;
    margin: 0;
    color: var(--color-background);
}

/* Panel del formulario */
.form-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-background);
}

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

.header-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-accent)
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0, 12, 24, 0.2);
}

.header-icon i {
    font-size: 2rem;
    color: var(--color-background);
}

.form-header h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 10px;
    font-family: "Glegoo", serif;
}

.form-header p {
    color: var(--color-text);
    font-size: 1.05rem;
    opacity: 0.8;
}

/* Alertas */
.alert {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.alert i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.alert-success {
    background: linear-gradient(135deg, var(--color-success), #20c997);
    color: white;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, var(--color-error), #e74c3c);
    color: white;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

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

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

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--color-accent);
    font-size: 1.2rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 20px 24px 20px 60px;
    border: 2px solid var(--color-secondary);
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: "Poppins", sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-accent);
    background: var(--color-background);
    box-shadow: 0 0 0 3px rgba(26, 60, 102, 0.1);
}

.form-input.error {
    border-color: var(--color-error);
    background: rgba(220, 53, 69, 0.05);
}

.input-wrapper.focused .input-icon {
    color: var(--color-primary);
    transform: scale(1.1);
}

.input-label {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    opacity: 0.7;
}

.input-wrapper.focused .input-label,
.form-input:focus + .input-label {
    top: -10px;
    left: 20px;
    font-size: 0.85rem;
    color: var(--color-primary);
    background: var(--color-background);
    padding: 0 8px;
    border-radius: 4px;
    opacity: 1;
    font-weight: 500;
}

.password-toggle {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    transition: all 0.3s ease;
    z-index: 2;
    border-radius: 50%;
}

.password-toggle:hover {
    color: var(--color-primary);
    background: rgba(26, 60, 102, 0.1);
}

/* Mensajes de error */
.error-message {
    display: flex;
    align-items: center;
    color: var(--color-error);
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 500;
}

.error-message i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Botón de login */
.login-btn {
    width: 100%;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-accent) 50%,
        var(--color-medical-blue) 100%
    );
    color: var(--color-background);
    border: none;
    padding: 20px 28px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    box-shadow: 0 12px 30px rgba(0, 12, 24, 0.2);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 12, 24, 0.3);
}

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

.btn-text {
    transition: all 0.3s ease;
}

.btn-icon {
    margin-left: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-loading {
    position: absolute;
    opacity: 0;
    transition: all 0.3s ease;
}

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

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

.contact-info p {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.help-link {
    display: flex;
    align-items: center;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(26, 60, 102, 0.2);
    background: rgba(26, 60, 102, 0.05);
}

.help-link:hover {
    color: var(--color-primary);
    background: rgba(26, 60, 102, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.help-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        margin: 10px;
        max-width: none;
        min-height: auto;
    }

    .info-panel {
        padding: 40px 30px;
        text-align: center;
    }

    .welcome-text h2 {
        font-size: 2rem;
    }

    .features {
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
        gap: 15px;
    }

    .feature {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: 120px;
        font-size: 0.9rem;
    }

    .feature i {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .form-panel {
        padding: 40px 30px;
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .info-panel,
    .form-panel {
        padding: 30px 20px;
    }

    .form-input {
        padding: 18px 20px 18px 55px;
        font-size: 1rem;
    }

    .input-icon {
        left: 18px;
        font-size: 1.1rem;
    }

    .input-label {
        left: 55px;
        font-size: 1rem;
    }

    .input-wrapper.focused .input-label,
    .form-input:focus + .input-label {
        left: 15px;
        font-size: 0.8rem;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .welcome-text h2 {
        font-size: 1.6rem;
    }

    .features {
        gap: 10px;
    }

    .feature {
        min-width: 100px;
        font-size: 0.85rem;
    }
}
