*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
}

body{
    background:#444;

    overflow:hidden;

    font-family:Segoe UI, Arial, sans-serif;

    display:flex;
    justify-content:center;
    align-items:center;
}

#contenedorApp{
    position:relative;
    flex:none;
}

#app{
    position:absolute;

    left:0;
    top:0;

    width:1200px;
    height:750px;

    background:#5b5b5b;

    overflow:hidden;

    border:1px solid #555;

    transform-origin:top left;
}

#botonPantallaCompleta{
    position:absolute;
    top:120px;
    right:40px;
    z-index:1000;
    width:54px;
    height:54px;
    padding:0;
    border:2px solid rgba(255,255,255,.8);
    border-radius:16px;
    background:transparent;
    color:white;
    box-shadow:0 3px 10px rgba(0,0,0,.45);
    font:600 28px Segoe UI Symbol, Segoe UI, Arial, sans-serif;
    cursor:pointer;
    touch-action:manipulation;
}

#botonPantallaCompleta:disabled{
    display:none;
}

#botonPantallaCompleta:active{
    transform:scale(.96);
}
/* Consulta de usuarios para administradores. */
.fondo-admin-usuarios {
    position: absolute; inset: 0; z-index: 300; display: grid; place-items: center;
    padding: 28px; background: rgba(0,0,0,.65); font-family: "Segoe UI", Arial, sans-serif;
}
.modal-admin-usuarios {
    display: flex; flex-direction: column; width: min(1080px, 100%); max-height: 690px;
    position: relative; padding: 22px; overflow: hidden; border-radius: 16px; background: #f5f5f5; color: #202020;
    box-shadow: 10px 10px 22px rgba(0,0,0,.5);
}
.modal-admin-usuarios h2 { margin: 0 0 12px; color: #064f8c; text-align: center; }
 .boton-lista-usuarios {
    min-height: 42px;
    padding: 7px 14px;
    border: 0;
    border-radius: 7px;
    background: #16863c !important;
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.resumen-admin-usuarios { margin-bottom: 12px; font-size: 17px; font-weight: 700; text-align: center; }
.acciones-principales-usuarios { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 12px; }
.acciones-principales-usuarios button { min-height: 42px; padding: 7px 14px; border: 0; border-radius: 7px; background: #0066cc; color: white; font-weight: 800; cursor: pointer; }
.acciones-principales-usuarios button:last-child { background: #5356a8; }
.controles-admin-usuarios { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.controles-admin-usuarios input[type="search"] { flex: 1 1 320px; min-height: 42px; padding: 8px 12px; font-size: 17px; }
.filtros-admin-usuarios { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filtros-admin-usuarios label { padding: 8px; border-radius: 7px; background: #ddd; font-weight: 700; cursor: pointer; }
.lista-admin-usuarios { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding-right: 5px; }
.usuario-admin-tarjeta { margin-bottom: 9px; padding: 11px; border-left: 8px solid; border-radius: 8px; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); }
.usuario-admin-cabecera { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.usuario-admin-estado { padding: 5px 10px; border: 0; border-radius: 5px; color: white; font-weight: 800; cursor: pointer; }
.acciones-usuario-admin { display: grid; justify-items: stretch; gap: 5px; }
.usuario-admin-eliminar { padding: 4px 8px; border: 0; border-radius: 5px; background: #a40000; color: white; font-size: 12px; font-weight: 800; cursor: pointer; }
.usuario-admin-rol { padding: 4px 8px; border: 0; border-radius: 5px; background: #5356a8; color: white; font-size: 12px; font-weight: 800; cursor: pointer; }
.estado-activo { border-color: #16863c; } .estado-activo .usuario-admin-estado { background: #16863c; }
.estado-inactivo { border-color: #777; } .estado-inactivo .usuario-admin-estado { background: #777; }
.estado-caducado { border-color: #c0392b; } .estado-caducado .usuario-admin-estado { background: #c0392b; }
.usuario-admin-detalles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px 14px; }
.usuario-admin-lista-encabezado, .usuario-admin-lista-item { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(160px, 1fr) minmax(220px, 1.4fr); align-items: center; gap: 14px; }
.usuario-admin-lista-encabezado { padding: 8px 12px; color: #064f8c; font-size: 13px; font-weight: 800; }
.usuario-admin-lista-item { width: 100%; margin-bottom: 6px; padding: 12px; border: 1px solid #d0d0d0; border-radius: 7px; background: white; color: #202020; text-align: left; cursor: pointer; font: inherit; }
.usuario-admin-lista-item:hover, .usuario-admin-lista-item:focus-visible { border-color: #16863c; background: #f0faf3; outline: 2px solid #16863c; outline-offset: 1px; }
.fondo-ficha-usuario { position: absolute; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.62); }
.ficha-usuario { width: min(620px, 100%); max-height: 700px; overflow-y: auto; padding: 24px; border-radius: 12px; background: white; color: #202020; box-shadow: 8px 8px 20px rgba(0,0,0,.5); }
.ficha-usuario h3 { margin: 0 0 18px; color: #064f8c; text-align: center; }
.ficha-usuario-datos { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 18px; }
.acciones-ficha-usuario { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 20px; }
.acciones-ficha-usuario button { min-height: 42px; padding: 7px 12px; border: 0; border-radius: 7px; background: #0066cc; color: white; font-weight: 800; cursor: pointer; }
.acciones-ficha-usuario .boton-cerrar-ficha-usuario { background: #8b0000; }
.usuario-admin-caducidad button { margin-left: 5px; padding: 3px 7px; border: 0; border-radius: 5px; background: #5356a8; color: white; font-weight: 700; cursor: pointer; }
.fondo-editor-caducidad { position: absolute; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.62); }
.editor-caducidad { display: grid; gap: 16px; width: min(480px, 100%); padding: 24px; border-radius: 12px; background: white; color: #202020; box-shadow: 8px 8px 20px rgba(0,0,0,.5); text-align: center; }
.editor-caducidad input[type="date"] { min-height: 48px; padding: 7px 10px; font-size: 19px; }
.acciones-editor-caducidad { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.acciones-editor-caducidad button { min-height: 42px; padding: 7px 12px; border: 0; border-radius: 7px; background: #0066cc; color: white; font-weight: 800; cursor: pointer; }
.acciones-editor-caducidad button:nth-child(2) { background: #555; }
.acciones-editor-caducidad button:last-child { background: #8b0000; }
.formulario-nuevo-usuario { display: grid; gap: 11px; width: min(520px, 100%); max-height: 700px; overflow-y: auto; padding: 22px; border-radius: 12px; background: white; color: #202020; box-shadow: 8px 8px 20px rgba(0,0,0,.5); }
.formulario-nuevo-usuario h3 { order: -1; margin: 0 0 5px; color: #064f8c; text-align: center; }
.formulario-nuevo-usuario label { display: grid; gap: 4px; font-weight: 700; text-align: left; }
.formulario-nuevo-usuario input { min-height: 43px; padding: 7px 10px; font-size: 17px; }
.cerrar-admin-usuarios { align-self: center; min-width: 180px; min-height: 44px; margin-top: 12px; border: 0; border-radius: 8px; background: #8b0000; color: white; font-size: 17px; font-weight: 800; cursor: pointer; }
.usuarios-vacio { padding: 30px; text-align: center; }
@media (max-width: 700px) {
    .fondo-admin-usuarios { padding: 10px; }
    .modal-admin-usuarios { max-height: 730px; padding: 14px; }
    .usuario-admin-detalles { grid-template-columns: 1fr; }
    .usuario-admin-lista-encabezado, .usuario-admin-lista-item { grid-template-columns: 1fr; gap: 4px; }
    .usuario-admin-lista-encabezado { display: none; }
    .ficha-usuario-datos { grid-template-columns: 1fr; }
}
