* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #1b4b5a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 900px;
}

.login-box {
    display: flex;
    width: 100%;
    min-height: 580px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* FORMULARIOS */
.forms-container {
    flex: 1.1;
    position: relative;
    background: white;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.35);
    z-index: 2;
}

.form-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.6s ease;
}

#loginSide {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

#registerSide {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.login-box.register-mode .forms-container {
    transform: translateX(100%);
}

.login-box.register-mode #loginSide {
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
}

.login-box.register-mode #registerSide {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
    z-index: 3;
}

/* INPUTS COMO TU IMAGEN */
.form-side h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 18px;
    color: #111;
}

.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.social-login a {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    background: white;
    text-decoration: none;
    font-size: 14px;
}

.small-text {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 20px;
}

.input-group {
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    background: #f1f1f1;
    border-radius: 2px;
    padding: 12px 12px;
    margin-bottom: 4px;
    gap: 8px;
    border: 1.5px solid transparent;
    transition: all .2s;
}

.input-group i {
    color: #6b7280;
    font-size: 13px;
}

.input-group input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
}

/* ===== CORRECCIÓN ERRORES INLINE ===== */
.input-group.error {
    border: 1.5px solid #ff3b3b !important;
    background: #ffeaea !important;
}

.msg-error {
    font-size: 11px;
    color: #ff3b3b;
    margin: 2px 0 10px 0;
    width: 100%;
    max-width: 300px;
    display: none;
    text-align: left;
    font-weight: 600;
    min-height: 14px;
}

.msg-error.active {
    display: block;
}

.bottom-row {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.forgot {
    font-size: 13px;
    color: #111;
    text-decoration: underline;
    font-weight: 500;
}

.btn-primary {
    background: #0a1b2e;
    color: #00d5ff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: .3s;
}

.btn-primary.full {
    width: 100%;
    max-width: 300px;
}

.btn-primary:hover {
    background: #00d5ff;
    color: #000;
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* PANEL AZUL */
.panel-side {
    flex: 1;
    background: linear-gradient(180deg, #0e2a3a 0%, #1b6a85 50%, #00b4d8 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.35);
    border-top-left-radius: 50% 50%;
    border-bottom-left-radius: 50% 50%;
    margin-left: -80px;
    padding-left: 80px;
    width: calc(50% + 80px);
}

.login-box.register-mode .panel-side {
    transform: translateX(-100%);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 50% 50%;
    border-bottom-right-radius: 50% 50%;
    margin-left: 0;
    margin-right: -80px;
    padding-left: 0;
    padding-right: 80px;
}

.panel {
    position: absolute;
    text-align: center;
    padding: 30px;
    width: 100%;
    transition: all 0.5s ease;
}

#panelLogin {
    transform: translateX(0);
    opacity: 1;
}

#panelRegister {
    transform: translateX(100%);
    opacity: 0;
}

.login-box.register-mode #panelLogin {
    transform: translateX(-100%);
    opacity: 0;
}

.login-box.register-mode #panelRegister {
    transform: translateX(0);
    opacity: 1;
}

.panel h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.panel p {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 250px;
    margin: 0 auto 25px;
}

.btn-outline {
    border: 1.5px solid white;
    color: white;
    padding: 10px 30px;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.btn-outline:hover {
    background: white;
    color: #0a1b2e;
}

/* MODAL CODIGO */
#modalCodigo {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#modalCodigo.active {
    display: flex;
}

.code-inputs input {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    border: 2px solid #00d5ff;
    border-radius: 8px;
    outline: none;
}

.code-inputs input:focus {
    border-color: #000;
}

.code-inputs input.error {
    border-color: #ff3b3b;
}

@media(max-width:768px) {
    body {
        padding: 0;
        background: #f1f1f1;
        align-items: flex-start;
    }

    .login-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .login-box {
        flex-direction: column;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .login-box.register-mode .forms-container,
    .forms-container,
    .login-box.register-mode .panel-side,
    .panel-side {
        transform: none !important;
    }

    .panel-side {
        flex: none;
        width: 100%;
        margin: 0;
        padding: 40px 25px 60px;
        min-height: 340px;
        border-radius: 0 0 50px 50px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 25px !important;
        padding-right: 25px !important;
        order: 1;
        clip-path: ellipse(110% 100% at 50% 0%);
    }

    .forms-container {
        flex: none;
        width: 100%;
        min-height: 520px;
        order: 2;
        background: white;
        border-radius: 30px 30px 0 0;
        margin-top: -30px;
        z-index: 4;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    }

    .form-side {
        padding: 30px 25px;
        position: absolute;
        height: auto;
        min-height: 480px;
    }

    #loginSide,
    #registerSide {
        transform: none !important;
    }

    #registerSide {
        transform: translateY(20px) !important;
    }

    .login-box.register-mode #registerSide {
        transform: translateY(0) !important;
    }

    .input-group,
    .bottom-row,
    .btn-primary.full,
    .msg-error {
        max-width: 100%;
    }

    .form-side h2 {
        font-size: 24px;
    }

    .panel h1 {
        font-size: 26px;
    }
}

@media(max-width:480px) {
    .form-side {
        padding: 25px 20px;
    }

    .panel-side {
        min-height: 300px;
        padding: 30px 20px 50px;
    }
}