/*
======================================================
                          BASE GENERAL
======================================================
*/
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/*
======================================================
                          LOGIN
======================================================
*/
.cuerpo_login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #38bdf8 100%);
    padding: 32px;
}

.tarjeta_login {
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.panel_login_marca {
    padding: 48px;
    color: #ffffff;
    background: linear-gradient(160deg, #0f172a, #1e40af);
    position: relative;
}

.logo_login {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 28px;
}

.titulo_login {
    font-size: 32px;
    line-height: 1.15;
    margin: 0 0 14px 0;
}

.texto_login {
    color: #dbeafe;
    line-height: 1.7;
    margin: 0 0 28px 0;
}

.lista_login {
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.lista_login li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
}

.panel_login_formulario {
    padding: 48px;
}

/*
======================================================
                          ESTRUCTURA PRINCIPAL
======================================================
*/
.contenedor_aplicacion {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 286px 1fr;
}

.barra_lateral {
    background: #0f172a;
    color: #e5e7eb;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.marca_sistema {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px;
}

.icono_marca {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    font-weight: 800;
}

.nombre_sistema {
    font-weight: 800;
    color: #ffffff;
}

.descripcion_sistema {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.titulo_menu {
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 18px 10px 8px;
}

.enlace_menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 4px;
    transition: 0.2s ease;
}

.enlace_menu:hover,
.enlace_menu_activo {
    background: #1e293b;
    color: #ffffff;
}

.icono_menu {
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icono_menu::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.area_contenido {
    min-width: 0;
}

.barra_superior {
    height: 72px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 5;
}

.ruta_pagina {
    font-size: 13px;
    color: #64748b;
}

.usuario_superior {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar_usuario {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.contenido_pagina {
    padding: 30px;
}

.encabezado_pagina {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.titulo_pagina {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #0f172a;
}

.descripcion_pagina {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.acciones_encabezado {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/*
======================================================
                          COMPONENTES
======================================================
*/
.tarjeta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    padding: 22px;
}

.tarjeta_compacta {
    padding: 18px;
}

.titulo_tarjeta {
    margin: 0 0 14px 0;
    color: #0f172a;
    font-size: 18px;
}

.texto_muted {
    color: #64748b;
}

.rejilla_tarjetas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.rejilla_dos_columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.rejilla_tres_columnas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.indicador_valor {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 8px 0 2px;
}

.indicador_etiqueta {
    color: #64748b;
    font-size: 13px;
}

.indicador_tendencia {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #047857;
    background: #dcfce7;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.boton {
    border: none;
    border-radius: 12px;
    padding: 11px 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s ease;
}

.boton_primario {
    background: #2563eb;
    color: #ffffff;
}

.boton_primario:hover {
    background: #1d4ed8;
}

.boton_secundario {
    background: #eef2ff;
    color: #1d4ed8;
}

.boton_secundario:hover {
    background: #dbeafe;
}

.boton_neutro {
    background: #f1f5f9;
    color: #334155;
}

.boton_peligro {
    background: #fee2e2;
    color: #b91c1c;
}

.boton_exito {
    background: #dcfce7;
    color: #047857;
}

.boton_ancho {
    width: 100%;
}

.insignia_backend_pendiente {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 7px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    white-space: nowrap;
}

.estado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.estado_exito {
    background: #dcfce7;
    color: #047857;
}

.estado_alerta {
    background: #fef3c7;
    color: #b45309;
}

.estado_error {
    background: #fee2e2;
    color: #b91c1c;
}

.estado_info {
    background: #dbeafe;
    color: #1d4ed8;
}

.estado_neutro {
    background: #f1f5f9;
    color: #475569;
}

/*
======================================================
                          FORMULARIOS
======================================================
*/
.formulario {
    display: grid;
    gap: 16px;
}

.fila_formulario {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.fila_formulario_tres {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.grupo_formulario {
    display: grid;
    gap: 7px;
}

.etiqueta_campo {
    font-size: 13px;
    color: #334155;
    font-weight: 700;
}

.campo_formulario,
.area_formulario,
.selector_formulario {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 11px 12px;
    background: #ffffff;
    color: #111827;
    outline: none;
}

.campo_formulario:focus,
.area_formulario:focus,
.selector_formulario:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.area_formulario {
    resize: vertical;
    min-height: 92px;
}

.acciones_formulario {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.mensaje_formulario {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.mensaje_error {
    background: #fee2e2;
    color: #b91c1c;
}

.mensaje_exito {
    background: #dcfce7;
    color: #047857;
}

.caja_carga {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 18px;
    padding: 28px;
    text-align: center;
}

.icono_carga {
    font-size: 36px;
    margin-bottom: 10px;
}

/*
======================================================
                          TABLAS
======================================================
*/
.contenedor_tabla {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.tabla_datos {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 900px;
}

.tabla_datos th {
    background: #f8fafc;
    color: #475569;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.tabla_datos td {
    padding: 14px;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    vertical-align: top;
}

.tabla_datos tr:hover td {
    background: #f8fafc;
}

.celda_acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filtros_tabla {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filtro_busqueda {
    min-width: 260px;
}

.paginacion_tabla {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.acciones_paginacion {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/*
======================================================
                          MODALES
======================================================
*/
.modal_oculto {
    display: none;
}

.modal_visible {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.55);
}

.modal_contenido {
    width: min(100%, 720px);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}

.encabezado_modal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

/*
======================================================
                          BLOQUES ESPECIALES
======================================================
*/
.lista_resumen {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.item_resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 14px;
}

.linea_tiempo {
    display: grid;
    gap: 14px;
}

.item_tiempo {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.fecha_tiempo {
    color: #2563eb;
    font-weight: 800;
}

.pestanas {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.pestana {
    padding: 10px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
}

.pestana_activa {
    background: #2563eb;
    color: #ffffff;
}

.perfil_empleado {
    display: flex;
    align-items: center;
    gap: 18px;
}

.foto_empleado {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
}

.dato_perfil {
    display: grid;
    gap: 4px;
}

.valor_perfil {
    font-weight: 800;
    color: #0f172a;
}

.detalle_perfil {
    color: #64748b;
    font-size: 13px;
}

.matriz_permisos {
    min-width: 980px;
}

.matriz_permisos td,
.matriz_permisos th {
    text-align: center;
}

.matriz_permisos td:first-child,
.matriz_permisos th:first-child {
    text-align: left;
}


.espacio_superior {
    margin-top: 12px;
}

/*
======================================================
                          RESPONSIVE
======================================================
*/
@media (max-width: 1100px) {
    .contenedor_aplicacion {
        grid-template-columns: 1fr;
    }

    .barra_lateral {
        position: relative;
        height: auto;
    }

    .rejilla_tarjetas,
    .rejilla_tres_columnas,
    .rejilla_dos_columnas {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .contenido_pagina {
        padding: 18px;
    }

    .barra_superior,
    .encabezado_pagina {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 18px;
    }

    .rejilla_tarjetas,
    .rejilla_tres_columnas,
    .rejilla_dos_columnas,
    .fila_formulario,
    .fila_formulario_tres,
    .tarjeta_login {
        grid-template-columns: 1fr;
    }

    .panel_login_marca,
    .panel_login_formulario {
        padding: 30px;
    }
}
