html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* =============================
   FONDO GENERAL
============================= */

.crm-wrapper {
    min-height: 100vh;
    background: url('../imgs/fondo_l.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Capa oscura vino encima */
.crm-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(122, 28, 28, 0.55),
        rgba(122, 28, 28, 0.35)
    );
    backdrop-filter: blur(4px);
}
.crm-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: #f5f2ee;
    border-radius: 30px;
    padding: 60px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.4);
}

/* =============================
   BOTON VOLVER
============================= */

.back-btn {
    position: absolute;
    top: 30px;
    left: 40px;
    background: #f5f2ee;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: #7a1c1c;
    font-weight: 600;
    z-index: 2;
}

/* =============================
   LADO IZQUIERDO
============================= */

.crm-left h1 {
    color: #7a1c1c;
    margin-bottom: 10px;
}

.crm-left p {
    color: #666;
    margin-bottom: 40px;
}

/* INPUTS */

.input-box {
    display: flex;
    align-items: center;
    background: #f5f2ee;
    border-radius: 15px;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    transition: 0.3s;
}
.input-box img{
    width: 14px;
    height: 14px;
}

.input-box:focus-within {
    border-color: #7a1c1c;
    box-shadow: 0 0 0 3px rgba(122,28,28,0.15);
}

.input-box .icon {
    margin-right: 10px;
}

.input-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

/* BOTON */

.btn-login {
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    border: none;
    background: #7a1c1c;
    color: #f5f2ee;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    background: #a32626;
    transform: translateY(-2px);
}

/* =============================
   LADO DERECHO
============================= */

.crm-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-box {
    background: #f5f2ee;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.logo-box img {
    width: 140px;
}

.connect {
    margin-top: 30px;
    color: #7a1c1c;
    font-size: 20px;
}

/* =============================
   FOOTER
============================= */

.crm-footer {
    position: relative;
    margin-top: 40px;
    background: #f5f2ee;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 15.5px;
    color: #7a1c1c;
}

/* =============================
   RESPONSIVE
============================= */

@media (max-width: 900px) {
    .crm-container {
        grid-template-columns: 1fr;
        padding: 40px;
    }

    .crm-right {
        display: none;
    }
}
.alert-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffe5e5;
    color: #b30000;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #ff4d4d;
    animation: fadeIn 0.4s ease-in-out;
}

.alert-error .icon {
    font-weight: bold;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}