/*
    login.css
    Rediseño Soft UI de la pantalla de inicio de sesion. El fondo de
    pagina (degradado navy) es fijo, independiente del tema; la tarjeta
    central y sus campos si adaptan claro/oscuro via la clase
    .dark-mode en <html> (sincronizada con localStorage['app_dark_mode'],
    ver el <script> inline en login.phtml).
*/

/* ---------- GENERAL ---------- */
* {
    box-sizing: border-box;
    margin: 0px auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    margin: 0;
}

a {
    color: #cbd5e1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #fff;
}

input {
    border: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5em;
    padding: 0;
    -webkit-appearance: none;
}

p {
    line-height: 1.5em;
}

.clearfix::before,
.clearfix::after {
    content: ' ';
    display: table;
}

.clearfix::after {
    clear: both;
}

/* ---------- FONDO DE PAGINA ---------- */
div.main {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #0F172A, #1E293B);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.container {
    position: static;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.middle {
    display: block;
    width: 100%;
}

/* ---------- LOGOTIPO (texto, sin imagen) ---------- */
.logo {
    margin-bottom: 28px;
    text-align: center;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.logo-text .logo-accent {
    color: #60a5fa;
    margin-left: 8px;
}

/* ---------- TARJETA CENTRAL ---------- */
#login {
    display: block;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.16);
    padding: 36px 32px;
    text-align: left;
    transition: background .15s ease, box-shadow .15s ease;
}

html.dark-mode #login {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

#login form {
    width: 100%;
}

fieldset {
    padding: 0;
    border: 0;
    margin: 0;
}

/* ---------- INPUTS ---------- */
#login form p {
    position: relative;
    margin-bottom: 16px;
}

#login form span.fa {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    color: #94a3b8;
    pointer-events: none;
}

#login form input[type="text"],
#login form input[type="password"] {
    width: 100%;
    height: 50px;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 12px;
    color: #0f172a;
    padding: 0 16px 0 44px;
    transition: background .15s ease, border-color .15s ease;
}

#login form input[type="text"]:focus,
#login form input[type="password"]:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
}

html.dark-mode #login form span.fa {
    color: #64748b;
}

html.dark-mode #login form input[type="text"],
html.dark-mode #login form input[type="password"] {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

html.dark-mode #login form input[type="text"]:focus,
html.dark-mode #login form input[type="password"]:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #3b82f6;
}

/*
 * .lv-requided (generic.css) es el marcador global de "campo
 * obligatorio" usado en todo el sistema: fuerza background:#fff
 * !important + un icono. En claro no se nota (el input ya es casi
 * blanco); en oscuro se veia como un input blanco roto sobre la
 * tarjeta oscura, asi que se ajusta solo el color de fondo conservando
 * el mismo icono.
 */
html.dark-mode #login form input.lv-requided {
    background: rgba(255, 255, 255, 0.06) url(../img/required.png) no-repeat 98% center !important;
}

html.dark-mode #login form input.lv-requided:focus {
    background: rgba(255, 255, 255, 0.1) url(../img/required.png) no-repeat 98% center !important;
}

/* ---------- ACCIONES (recuperar clave + boton) ---------- */
.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.login-actions a {
    color: #64748b;
    font-size: 12.5px;
}

.login-actions a:hover {
    color: #2563eb;
}

html.dark-mode .login-actions a {
    color: #94a3b8;
}

html.dark-mode .login-actions a:hover {
    color: #60a5fa;
}

#login form button {
    background: #ea580c;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    height: auto;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
    transition: filter .15s ease, transform .15s ease;
}

#login form button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#login form button:active {
    transform: translateY(0);
}

/* ---------- PIE DE PAGINA ---------- */
.foot {
    padding: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 20px;
    text-align: center;
}

/* ---------- VALIDACION (jquery.validate) ---------- */
label.error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin: 6px 0 0 4px;
    text-align: left;
}

input.error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

html.dark-mode input.error {
    background: rgba(239, 68, 68, 0.1) !important;
}
