/* ============================================================
   ESTILOS DEL CRM
   ============================================================ */
:root {
    --fondo: #f3f5f8;
    --superficie: #ffffff;
    --texto: #1c2430;
    --texto-suave: #5b6878;
    --borde: #d8dee6;
    --principal: #1f5fbf;
    --principal-hover: #174a96;
    --error-fondo: #fdecec;
    --error-texto: #a32222;
    --ok-fondo: #e8f6ee;
    --ok-texto: #1d6b3d;
    --radio: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.5;
}

.logo {
    display: inline-block;
    background: var(--principal);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
}

.subtitulo { color: var(--texto-suave); margin-top: 0.25rem; }

/* ---------- Login ---------- */
.pagina-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.caja-login {
    width: 100%;
    max-width: 380px;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 2rem;
    box-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
}

.marca { text-align: center; margin-bottom: 1.5rem; }
.marca h1 { margin: 0.8rem 0 0; font-size: 1.4rem; }

form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
}

form input[type="email"],
form input[type="password"],
form input[type="text"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--borde);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

form input:focus {
    outline: 2px solid var(--principal);
    outline-offset: 1px;
    border-color: var(--principal);
}

.campo-password { position: relative; }
.campo-password input { padding-right: 5rem; }
.ver-password {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--principal);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}

.boton-principal {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
    border: 0;
    border-radius: 8px;
    background: var(--principal);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.boton-principal:hover { background: var(--principal-hover); }

.boton-secundario {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--borde);
    border-radius: 8px;
    background: #fff;
    color: var(--texto);
    cursor: pointer;
}
.boton-secundario:hover { background: var(--fondo); }

.mensaje {
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
}
.mensaje-error { background: var(--error-fondo); color: var(--error-texto); }
.mensaje-ok    { background: var(--ok-fondo);    color: var(--ok-texto); }

/* ---------- Panel ---------- */
.barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--superficie);
    border-bottom: 1px solid var(--borde);
}
.barra .usuario { display: flex; align-items: center; gap: 0.9rem; }
.barra .usuario small { color: var(--texto-suave); }
.barra form { margin: 0; }

.contenido { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem; }
.contenido h1 { margin-bottom: 0; }

.rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.tarjeta-modulo {
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 1.25rem;
}
.tarjeta-modulo h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.tarjeta-modulo p { margin: 0; color: var(--texto-suave); font-size: 0.9rem; }

@media (max-width: 520px) {
    .barra .usuario span { display: none; }
}
