/* =====================================================================
   ESTILOS DE AUTENTICACIÓN (Pantalla Dividida)
   Archivo: public/css/auth.css
   ===================================================================== */

body.cdx-guest-body {
    margin: 0;
    padding: 0;
    background: var(--paper, #f4eedd);
}

.cdx-auth-shell {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* 45% Hero / 55% Formulario */
    min-height: 100vh;
}

/* ----------------------- PANEL IZQUIERDO (HERO) ----------------------- */
.cdx-auth-hero {
    background: linear-gradient(135deg, var(--leaf-deep, #4f7a48), var(--leaf, #6f9c63));
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.cdx-auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.cdx-hero-content {
    margin: auto 0;
    position: relative;
    z-index: 2;
}

.cdx-hero-logo {
    width: 65px;
    height: 65px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.cdx-hero-title {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.cdx-hero-title span {
    color: var(--gold-light, #f8e08a);
}

.cdx-hero-text {
    font-family: 'Mulish', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 420px;
    margin: 0;
}

.cdx-hero-foot {
    position: relative;
    z-index: 2;
    font-family: 'Mulish', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 15px;
}

.flag-bar {
    display: flex;
    width: 30px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}
.flag-bar i { flex: 1; }
.flag-bar i:nth-child(1) { background: #f6c63c; flex: 2; }
.flag-bar i:nth-child(2) { background: #1f4e8c; }
.flag-bar i:nth-child(3) { background: #c1372e; }


/* ----------------------- PANEL DERECHO (FORMULARIO) ----------------------- */
.cdx-auth-panel {
    background: var(--panel, #fbf7ec);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* LA CAJA QUE EVITA QUE SE ESTIRE */
.cdx-auth-container {
    width: 100%;
    max-width: 420px; /* Límite estricto de ancho */
    background: #ffffff;
    padding: 40px 35px;
    border-radius: var(--radius, 16px);
    box-shadow: 0 15px 35px rgba(58, 53, 43, 0.08);
    border: 1px solid var(--line-soft, #e7ddc4);
}

.cdx-auth-heading {
    text-align: center;
    margin-bottom: 25px;
}

.cdx-auth-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink, #3a352b);
    margin: 0 0 8px 0;
}

.cdx-auth-subtitle {
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
    color: var(--ink-soft, #6f6757);
    margin: 0;
}

.cdx-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cdx-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cdx-label {
    font-family: 'Mulish', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink, #3a352b);
}

.cdx-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--line, #d9cfb4);
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
    background: #fdfdfd;
    color: var(--ink, #3a352b);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cdx-input:focus {
    outline: none;
    border-color: var(--leaf, #6f9c63);
    box-shadow: 0 0 0 3px rgba(111,156,99,0.15);
}

.cdx-error {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: var(--co-red, #c1372e);
    font-weight: 600;
}

.cdx-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 10px;
}

.cdx-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Mulish', sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft, #6f6757);
    cursor: pointer;
}

.cdx-link {
    font-family: 'Mulish', sans-serif;
    font-size: 0.85rem;
    color: var(--leaf-deep, #4f7a48);
    text-decoration: none;
    transition: color 0.2s;
}

.cdx-link:hover {
    color: var(--leaf, #6f9c63);
    text-decoration: underline;
}

.cdx-link--bold { font-weight: 800; }

.cdx-btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(180deg, var(--gold, #e9b53d), var(--gold-deep, #c8911f));
    color: #3a2603;
    border: none;
    border-radius: 8px;
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(200, 145, 31, 0.3);
    transition: all 0.2s ease;
}

.cdx-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200, 145, 31, 0.5);
}

.cdx-auth-foot {
    text-align: center;
    margin-top: 30px;
    font-family: 'Mulish', sans-serif;
    font-size: 0.85rem;
    color: var(--ink-soft, #6f6757);
}

/* ----------------------- RESPONSIVE ----------------------- */
@media (max-width: 900px) {
    .cdx-auth-shell {
        grid-template-columns: 1fr;
    }
    .cdx-auth-hero {
        padding: 40px 20px;
        text-align: center;
        align-items: center;
        min-height: 40vh;
    }
    .cdx-hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .cdx-hero-foot {
        justify-content: center;
        margin-top: 30px;
    }
    .cdx-auth-panel {
        padding: 30px 15px;
    }
}