/* Estilos Generales del Contenedor */
.crl-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Contenedor de las pestañas */
.crl-tabs {
    display: flex;
    flex-wrap: wrap;
}

/* Ocultamos los radio buttons, son solo para control */
.crl-tabs > input {
    display: none;
}

/* Estilo de las etiquetas que funcionan como botones de pestaña */
.crl-tabs > label {
    width: 50%;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    color: #777;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    order: 1; /* Coloca las pestañas primero */
}

.crl-tabs > label[for="tab-login"] {
    border-radius: 8px 0 0 0;
}
.crl-tabs > label[for="tab-register"] {
    border-radius: 0 8px 0 0;
}

/* Contenido de los formularios (oculto por defecto) */
.crl-tab-content {
    display: none;
    width: 100%;
    padding: 25px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    order: 2; /* Coloca el contenido después de las pestañas */
}

/* --- LA MAGIA DEL CSS --- */
/* Cuando un radio button está seleccionado, cambiamos el estilo de su label */
.crl-tabs > input:checked + label {
    background-color: #ffffff;
    color: #007944;
    border-bottom: 3px solid #007944;
}

/* Y mostramos el contenido asociado a ese radio button seleccionado */
#tab-login:checked ~ #login-content {
    display: block;
}
#tab-register:checked ~ #register-content {
    display: block;
}

/* Estilos de los formularios internos */
.crl-tab-content h2 {
    color: #333;
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
}

.crl-input-group {
    margin-bottom: 20px;
}

.crl-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.crl-input-group input,
.crl-input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.crl-input-group input:focus,
.crl-input-group select:focus {
    outline: none;
    border-color: #007944;
    box-shadow: 0 0 0 3px rgba(0, 121, 68, 0.1);
}

.crl-button {
    width: 100%;
    padding: 15px;
    background-color: #007944;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.crl-button:hover {
    background-color: #005d35;
}