/* register-styles.css — Split layout (form left / welcome right) */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
}

body {
    background: #e9ebee;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 16px;
    font-family: 'DM Sans', sans-serif;
    overflow: hidden;
}

/* ── Outer wrapper ── */
.container {
    display: flex;
    width: 80%;
    max-width: 960px;
    height: calc(100vh - 32px);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ============================
   LEFT — Registration form
   ============================ */
.register-panel {
    width: 50%;
    background-color: #fafafa;
    border-radius: 10px 0 0 10px;
    text-align: center;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.title {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
    text-align: center;
}

/* Inputs */
.form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-family: 'DM Sans', sans-serif;
    color: #9ca3af;
    margin-bottom: 6px;
    font-weight: 400;
    font-size: 14px;
}

.input-group input {
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    padding: 7px 12px;
    border: none;
    background-color: #eeeeef;
    color: #000;
    font-size: 14px;
    border-radius: 4px;
    outline: 0;
    transition: all 0.3s ease;
}

.input-group input:focus {
    background-color: #e4e4e6;
    box-shadow: 0 0 0 2px rgba(58, 110, 153, 0.25);
}

/* Messages */
.message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 12px;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.divider hr,
.divider div {
    flex: 1;
    height: 1px;
    background: #ddd;
    border: none;
}

.divider span {
    color: #9ca3af;
    font-size: 12px;
}

/* Signup link */
.signup {
    font-family: 'DM Sans', sans-serif;
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    margin-bottom: 0;
}

.signup a {
    color: #3a6e99;
    text-decoration: none;
    transition: 0.3s all ease-in-out;
}

.signup a:hover {
    font-weight: bold;
    text-decoration: underline;
}

/* ============================
   RIGHT — Welcome / CTA panel
   ============================ */
.welcome-panel {
    width: 50%;
    background-image: linear-gradient(135deg, #1c3a52 5%, #3a6e99 95%);
    color: #fff;
    border-radius: 0 10px 10px 0;
    text-align: center;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome-panel h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 16px;
    color: #fff;
    letter-spacing: 1px;
}

.welcome-panel p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    margin-bottom: 28px;
    color: #fff;
    line-height: 1.6;
}

.welcome-panel .login-cta {
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 10px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s all ease-in-out;
    display: inline-block;
}

.welcome-panel .login-cta:hover {
    color: #3a6e99;
    background-color: #fff;
}

/* Banner de referido */
.referral-banner {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    flex-shrink: 0;
}

.referral-banner:not([hidden]) {
    display: block;
}

.referral-banner p {
    font-size: 12px;
    color: #065f46;
    margin: 0;
    line-height: 1.45;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        width: 95%;
        height: auto;
        max-height: 95vh;
    }

    .register-panel,
    .welcome-panel {
        width: 100%;
        border-radius: 0;
    }

    .register-panel {
        border-radius: 10px 10px 0 0;
        padding: 30px 24px;
    }

    .welcome-panel {
        border-radius: 0 0 10px 10px;
        padding: 30px 24px;
    }
}

/* Móvil (≤768px) + ?ref=: espaciado y tipografía referido */
@media (max-width: 768px) {
    body.register-has-referral .register-panel,
    body.register-has-referral .register-panel input,
    body.register-has-referral .register-panel button,
    body.register-has-referral .register-panel label,
    body.register-has-referral .register-panel p,
    body.register-has-referral .register-panel a,
    body.register-has-referral .register-panel .message,
    body.register-has-referral .register-panel .signup {
        font-family: 'DM Sans', sans-serif;
    }

    body.register-has-referral .title {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    body.register-has-referral .input-group input,
    body.register-has-referral #submitBtn,
    body.register-has-referral .divider span,
    body.register-has-referral label,
    body.register-has-referral .signup,
    body.register-has-referral .signup a,
    body.register-has-referral .message,
    body.register-has-referral .referral-banner p {
        font-size: 14px;
        line-height: 1.4;
    }

    body.register-has-referral #submitBtn {
        font-weight: 600;
    }

    body.register-has-referral .form {
        gap: 5px;
    }

    body.register-has-referral .divider {
        margin-bottom: 4px;
    }

    body.register-has-referral .referral-banner {
        margin-top: 10px;
        margin-bottom: 4px;
        padding: 10px 12px;
    }

    body.register-has-referral .welcome-panel {
        display: none;
    }
}
