:root{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#17324a;background:#f4f7fa}*{box-sizing:border-box}body{margin:0}.contenedor{max-width:980px;margin:30px auto;padding:28px;background:white;border-radius:16px;box-shadow:0 8px 35px #16304614}h1{font-size:1.7rem}h2{font-size:1.2rem}nav{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:28px}a{color:#11658c}label{display:block;font-weight:600;margin-bottom:15px}input,select,textarea{width:100%;display:block;padding:11px;border:1px solid #bdcdd6;border-radius:8px;margin-top:7px;font:inherit}button{background:#106a79;color:white;border:0;border-radius:8px;padding:12px 22px;font-weight:700;cursor:pointer}button:hover{background:#0b5460}.busqueda{display:grid;grid-template-columns:2fr 1fr auto;align-items:end;gap:12px}.busqueda label{margin:0}article{border:1px solid #e2e8ee;padding:17px;border-radius:12px;margin:15px 0}article p{margin:7px 0}.etiqueta{background:#e0f0ec;color:#075d49;padding:5px 9px;border-radius:7px;margin-right:6px;font-size:.8rem}.error{color:#ad2a2a}.ok{color:#146b43}small,.ayuda{color:#607485}.enlaces{display:flex;gap:16px;flex-wrap:wrap}.pill{display:inline-block;background:#e8f3f6;padding:6px 10px;border-radius:99px;margin:2px}@media(max-width:670px){.contenedor{margin:12px;padding:18px}.busqueda{grid-template-columns:1fr}}
/* AGREGA ESTO AL FINAL DE css/estilos.css */
.visor-pdf{display:block;width:100%;height:75vh;min-height:520px;border:1px solid #d5e1e9;border-radius:12px;background:#eef3f6}
.boton-link{display:inline-block;background:#106a79;color:#fff;text-decoration:none;font-weight:700;padding:10px 14px;border-radius:8px}
.boton-link:hover{background:#0b5460;color:#fff}

/* Visor PDF NANDA - NOC - NIC */
.visor-pdf {
    display: block;
    width: 100%;
    height: 85vh;
    min-height: 650px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background-color: #ffffff;
}


/* =========================================
   SISTEMA DE ENFERMERIA
   DISENO RESPONSIVE PARA ANDROID
========================================= */

/* Configuracion general */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
}

img, iframe, video {
    max-width: 100%;
}

/* Enlaces y botones */
button, input, select, textarea {
    font: inherit;
}

button, .boton-link {
    touch-action: manipulation;
}

/* Computadoras y tablets */
.contenedor {
    width: calc(100% - 24px);
    max-width: 1100px;
    margin: 20px auto;
}

/* Pantallas de celulares */
@media (max-width: 600px) {

    body {
        font-size: 15px;
        line-height: 1.5;
    }

    .contenedor {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 16px 12px 24px;
        border-radius: 0;
        box-shadow: none;
    }

    h1 {
        font-size: 1.55rem;
        line-height: 1.25;
        margin: 12px 0 16px;
    }

    h2 {
        font-size: 1.2rem;
    }

    /* Menu adaptable */
    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 18px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    nav a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 9px 11px;
        background: #f0f6f8;
        border-radius: 9px;
        color: #075d73;
        font-size: 13px;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    /* Buscador y formularios */
    .busqueda {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 46px;
        font-size: 16px;
    }

    textarea {
        min-height: 100px;
    }

    .busqueda button {
        width: 100%;
        min-height: 46px;
        margin: 0;
    }

    button {
        min-height: 42px;
    }

    /* Resultados */
    article {
        padding: 14px 12px;
        overflow-wrap: anywhere;
    }

    /* Biblioteca */
    .grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Visor PDF */
    .visor-pdf,
    .visor-local-iframe {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 70dvh;
        min-height: 380px;
        border-radius: 9px;
    }

    .visor-local-panel {
        padding: 12px;
        margin: 12px 0;
    }

    /* Tablas futuras PAE */
    table {
        width: 100%;
    }

    .tabla-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* ===================================
   MENU RESPONSIVE ENFERMERIA
=================================== */

.menu-principal {
    display: block;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dce3eb;
}

.menu-cabecera {
    display: none;
}

.menu-enlaces {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.menu-enlaces a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 12px;
    color: #075d73;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
}

.menu-enlaces a:hover {
    background: #e7f3f5;
}

/* ANDROID Y CELULARES */
@media (max-width: 768px) {

    .menu-principal {
        margin-bottom: 18px;
    }

    .menu-cabecera {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .menu-marca {
        font-size: 17px;
        font-weight: 700;
        color: #075d73;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 9px 16px;
        background: #075d73;
        color: #fff;
        border: none;
        border-radius: 9px;
        font-size: 15px;
        cursor: pointer;
    }

    .menu-enlaces {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        margin-top: 12px;
    }

    .menu-enlaces.abierto {
        display: flex;
    }

    .menu-enlaces a {
        display: flex;
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        background: #f0f6f8;
        color: #075d73;
        border-radius: 9px;
        text-decoration: none;
    }

    .menu-enlaces a:hover {
        background: #dceef1;
    }
}

/* ETAPA 15 - Mejoras móviles, sin reemplazar los estilos existentes */
:root { --e15-accent: #087b86; --e15-border: #d8e5e9; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, canvas, iframe { max-width: 100%; }
.contenedor { width: min(100% - 24px, 1180px); margin-inline: auto; }
.contenedor :is(input,select,textarea,button) { max-width: 100%; }
.contenedor :is(input,select,textarea) { min-width: 0; }
.contenedor :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { font-size: 16px; }
.contenedor textarea { width: 100%; }
.contenedor :is(table) { border-collapse: collapse; }
/* En pantallas estrechas, las tablas pueden desplazarse sin ocultar columnas. */
.e15-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.e15-table-scroll table { min-width: 620px; width: 100%; }
.e15-mobile-header { display: none; }
@media (max-width: 760px) {
  .contenedor { width: calc(100% - 20px); }
  .contenedor h1 { font-size: clamp(1.35rem, 5vw, 1.8rem); overflow-wrap: anywhere; }
  .contenedor h2 { font-size: clamp(1.15rem, 4vw, 1.45rem); }
  .contenedor :is(button,.boton,input[type="submit"]) { min-height: 42px; }
  .contenedor :is(input,textarea,select) { width: 100%; }
  .contenedor :is(input[type="checkbox"], input[type="radio"]) { width: auto; }
  .contenedor :is(.fila,.row,.acciones,.botones) { flex-wrap: wrap; }
  .contenedor :is(pre,code) { overflow-wrap: anywhere; }
  /* Menú sin JS: horizontal desplazable y siempre accesible */
  .contenedor > nav:not(.e15-nav) { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 4px 0 12px; -webkit-overflow-scrolling: touch; }
  .contenedor > nav:not(.e15-nav) a { flex: 0 0 auto; white-space: nowrap; }
  /* Menú mejorado cuando el JS carga correctamente */
  .e15-mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; }
  .e15-mobile-title { font-size: 14px; font-weight: 700; color: #155063; }
  .e15-menu-button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--e15-border); border-radius: 10px; background: #eff7f8; color: #155063; font: inherit; font-weight: 700; cursor: pointer; }
  .contenedor > nav.e15-nav { display: none !important; flex-direction: column; align-items: stretch; gap: 6px; margin: 0 0 16px; padding: 10px; background: #f4fafb; border: 1px solid var(--e15-border); border-radius: 12px; }
  .contenedor > nav.e15-nav.e15-open { display: flex !important; }
  .contenedor > nav.e15-nav a { display: block; width: 100%; margin: 0; padding: 12px; text-align: left; white-space: normal; border-radius: 8px; }
}
@media (min-width: 761px) {
  .contenedor > nav.e15-nav { display: flex; flex-wrap: wrap; }
}



/* ETAPA 15 - Menú alineado a la derecha */

@media (max-width: 760px) {

    .e15-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 12px;
    }

    .e15-mobile-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .e15-menu-button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        margin-left: auto !important;
        margin-right: 0 !important;
    }

}

