/* ============================================================
   INTEGRAL SUITE - estilos de la aplicacion MVC
   Reemplaza los estilos de MUI/App.css del frontend React
   ============================================================ */

/* ---------- Tipografia ---------- */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/lato/lato-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/lato/lato-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/lato/lato-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('/fonts/lato/lato-latin-900.woff2') format('woff2');
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f2f5f9;
    color: #212529;
}

/* ---------- Estructura ---------- */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-body {
    display: flex;
    flex: 1 1 auto;
    min-height: calc(100vh - 6vh);
    align-items: stretch;
}

/* ---------- Header ---------- */
.app-header {
    background-color: #2ECC71;
    min-height: 6vh;
    flex-shrink: 0;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.6rem 1.5rem;
}

.app-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #08301d;
}

.app-header-info i {
    font-size: 1.5rem;
}

.app-header-user {
    font-weight: 700;
    font-size: 1rem;
}

.app-header-company {
    font-size: 0.85rem;
    opacity: 0.85;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(8, 48, 29, 0.35);
}

.btn-logout {
    background: #0b5345;
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.btn-logout:hover {
    background: #083f34;
    color: #fff;
}

/* ---------- Menu lateral ---------- */
.app-menu {
    width: 250px;
    flex-shrink: 0;
    background-color: #051E34;
    color: #fff;
    overflow-y: auto;
    min-height: calc(100vh - 6vh);
    height: 100%;
}

.menu-nav {
    padding: 0.75rem 0.5rem 2rem;
}

.menu-modulo {
    margin-bottom: 1rem;
}

.menu-modulo-titulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
}

.menu-modulo-titulo i {
    color: #fff;
    font-size: 1.25rem;
}

.menu-submodulo {
    margin-left: 0.5rem;
    margin-bottom: 0.75rem;
}

.menu-submodulo-titulo {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    font-size: 0.95rem;
    padding: 0 0 0.25rem 1rem;
}

.menu-submodulo-titulo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #1976d2;
}

.menu-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-opcion {
    display: block;
    color: #fff;
    font-size: 0.92rem;
    text-decoration: none;
    padding: 0.45rem 0.75rem 0.45rem 1.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-opcion:hover {
    background-color: #1976d2;
    color: #fff;
}

.menu-opcion.activo {
    background-color: #1976d2;
    color: #fff;
    font-weight: 700;
}

.menu-vacio {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- Contenido ---------- */
.app-content {
    flex: 1;
    padding: 1rem 1rem 2rem;
    overflow-y: auto;
    min-width: 0;
}

.app-content-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 6vh);
    padding: 1rem;
}

.body-simple {
    overflow: hidden;
}

/* ---------- Login / portada ---------- */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    border: none;
}

.text-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.text-logo h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #031633;
    margin: 0;
    letter-spacing: 2px;
}

.text-logo p {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4CAF50;
    letter-spacing: 2px;
    margin: 0.4rem 0 0;
}

.btn-ingresar {
    background: #0b5345;
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
}

.btn-ingresar:hover {
    background: #083f34;
    color: #fff;
}

.input-group-text {
    background: #fff;
}

/* ---------- Paginas de aviso ---------- */
.pagina-bienvenida {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem;
}

.no-encontrado h1,
.en-construccion h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #031633;
}

.no-encontrado h1 {
    color: #c0392b;
}

.en-construccion h1 {
    color: #0b5345;
}

/* ---------- SweetAlert2 por encima de los modales ---------- */
.swal2-popup {
    z-index: 99999 !important;
}

.swal2-container {
    z-index: 99998 !important;
}

/* ---------- Pantallas pequenas ---------- */
@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
    }

    .app-menu {
        width: 100%;
        max-height: 40vh;
    }

    .app-header-inner {
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
    }

    .app-header-company {
        display: none;
    }

    .menu-opcion {
        font-size: 0.85rem;
    }
}
