/* ProcesosSIS Web: colores institucionales del SIS */
:root {
    --primario: #005499;
    --oscuro: #002E5C;
    --acento: #00A651;
    --borde: #CED4DA;
    --fondo: #F2F4F7;
    --texto: #1F2933;
    --tenue: #6B7280;
    --error: #C62828;
    --aviso: #B26A00;
    --fuente: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html, body {
    margin: 0;
    height: 100%;
    font-family: var(--fuente);
    font-size: 14px;
    color: var(--texto);
    background: var(--fondo);
}

h1, h2 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; }
.nota { color: var(--tenue); font-size: 0.9em; }
.cargando { padding: 2rem; color: var(--tenue); text-align: center; }

/* ---------- Carga inicial y error de Blazor ---------- */
.loading-progress { position: absolute; display: block; width: 8rem; height: 8rem; inset: 20vh 0 auto 0; margin: 0 auto; }
.loading-progress circle { fill: none; stroke: #e0e0e0; stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child {
    stroke: var(--primario);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto 0.2rem; }
.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Cargando"); }

#blazor-error-ui {
    display: none;
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000;
    padding: 0.6rem 1.25rem 0.7rem;
    background: #FFF3CD; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---------- Login ---------- */
.login-fondo {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    /* Gris pizarra claro y neutro: la tarjeta (panel azul institucional) resalta sin competir con el fondo */
    background:
        radial-gradient(ellipse at top, rgba(255, 255, 255, 0.9), transparent 60%),
        linear-gradient(180deg, #EEF1F5 0%, #DCE1E8 100%);
}
.login {
    display: flex; width: 100%; max-width: 760px; min-height: 420px;
    background: #fff; border-radius: 10px; overflow: hidden;
    border: 1px solid #D3D9E1;
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.18), 0 2px 6px rgba(30, 41, 59, 0.08);
}
.login-marca {
    flex: 0 0 42%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 2rem 1.5rem;
    background: var(--primario); color: #fff; text-align: center;
}
.login-logo { width: 170px; max-width: 100%; background: #fff; border-radius: 8px; padding: 8px; }
.login-sistema { font-size: 1.8rem; font-weight: 700; margin-top: 0.5rem; }
.login-unidad { font-size: 1rem; opacity: 0.9; }
.login-acento { width: 60px; height: 4px; background: var(--acento); border-radius: 2px; margin: 0.4rem 0; }
.login-pie { margin-top: auto; font-size: 0.85rem; opacity: 0.85; }
.login-pie span { font-size: 0.8rem; opacity: 0.8; }

.login-contenido { flex: 1; padding: 2.5rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.login-contenido h1 { font-size: 1.6rem; color: var(--oscuro); }
.login-subtitulo { color: var(--tenue); margin: 0.3rem 0 1.5rem; }
.login-nota { color: var(--aviso); margin: 0 0 1rem; font-weight: 600; }
.login-etiqueta { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; color: var(--tenue); margin-bottom: 0.3rem; }
.login-campo {
    display: flex; align-items: center;
    border: 1px solid var(--borde); border-radius: 6px; margin-bottom: 1rem; background: #fff;
}
.login-campo:focus-within { border-color: var(--primario); box-shadow: 0 0 0 3px rgba(0, 84, 153, 0.15); }
.login-campo input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0.6rem 0.75rem; background: transparent; }
.login-mostrar { border: 0; background: none; color: var(--primario); cursor: pointer; padding: 0 0.75rem; font-size: 0.85rem; }
.login-avisos { min-height: 1.5rem; margin-bottom: 0.5rem; }
.login-mayus { color: var(--aviso); font-size: 0.9rem; }
.login-error { color: var(--error); font-size: 0.9rem; }
.login-ingresar {
    width: 100%; padding: 0.7rem; border: 0; border-radius: 6px;
    background: var(--primario); color: #fff; font-weight: 600; cursor: pointer;
}
.login-ingresar:hover:not(:disabled) { background: var(--oscuro); }
.login-ingresar:disabled { opacity: 0.6; cursor: default; }
.login-botones { display: flex; gap: 0.5rem; }
.login-volver { padding: 0.7rem 1.2rem; border: 1px solid var(--borde); border-radius: 6px; background: #fff; cursor: pointer; }

@media (max-width: 640px) {
    .login { flex-direction: column; }
    .login-marca { flex: none; padding: 1.5rem; }
    .login-pie { margin-top: 0.5rem; }
    .login-contenido { padding: 1.5rem; }
}

/* ---------- Principal (FrmPrincipal) ---------- */
.principal { display: flex; flex-direction: column; height: 100vh; }

.barra-menu {
    display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap;
    padding: 0 0.75rem; min-height: 46px;
    background: var(--primario); color: #fff;
    position: relative; z-index: 20;
}
.barra-menu-logo img { height: 34px; background: #fff; border-radius: 4px; padding: 2px 4px; display: block; margin-right: 0.5rem; }
.menu-raiz { position: relative; }
.menu-raiz-boton {
    border: 0; background: none; color: #fff; padding: 0.7rem 0.9rem; cursor: pointer; border-radius: 4px;
}
.menu-raiz-boton:hover:not(:disabled), .menu-raiz.abierto > .menu-raiz-boton { background: var(--oscuro); }
.menu-raiz-boton:disabled { opacity: 0.5; cursor: default; }
.menu-icono { display: inline-block; width: 1.5em; text-align: center; margin-right: 0.3em; }

.menu-lista {
    list-style: none; margin: 0; padding: 0.25rem 0;
    position: absolute; top: 100%; left: 0; min-width: 260px;
    background: #fff; color: var(--texto);
    border: 1px solid var(--borde); border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.menu-item { position: relative; }
.menu-item > button {
    display: flex; align-items: center; width: 100%;
    border: 0; background: none; padding: 0.45rem 0.9rem; text-align: left; cursor: pointer; color: inherit;
}
.menu-item > button:hover:not(:disabled), .menu-item.abierto > button { background: #E6EEF7; }
.menu-item > button:disabled { color: #A0A7B0; cursor: default; }
.menu-texto { flex: 1; }
.menu-flecha { margin-left: 1rem; color: var(--tenue); }
.menu-pendiente { margin-left: 1rem; color: var(--aviso); }
.menu-item .menu-lista { top: -0.3rem; left: 100%; }
.menu-cerrar { position: fixed; inset: 0; z-index: 10; }

.barra-menu-usuario { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.enlace { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

.area-trabajo { flex: 1; overflow: auto; padding: 1.25rem; }

.barra-estado {
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    padding: 0.3rem 0.75rem; font-size: 0.85rem;
    background: #E9ECEF; border-top: 1px solid var(--borde);
}
.barra-estado-enlace { border: 0; background: none; color: var(--primario); cursor: pointer; padding: 0; font-size: inherit; }
.barra-estado-enlace:hover { text-decoration: underline; }
.barra-estado-derecha { margin-left: auto; color: var(--tenue); }

/* ---------- Inicio ---------- */
.inicio { max-width: 1100px; margin: 0 auto; }
.inicio-cabecera {
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    padding: 1.25rem; margin-bottom: 1.25rem;
    background: #fff; border-radius: 8px; border-left: 6px solid var(--acento);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.inicio-cabecera img { height: 70px; }
.inicio-cabecera h1 { font-size: 1.4rem; color: var(--oscuro); }
.inicio-cabecera p { margin: 0.2rem 0 0; }
.inicio h2 { font-size: 1.1rem; color: var(--primario); margin: 1rem 0 0.6rem; }
.inicio-accesos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.acceso {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.8rem; border: 1px solid var(--borde); border-radius: 8px;
    background: #fff; text-align: left; cursor: pointer; color: inherit;
}
.acceso:hover:not(:disabled) { border-color: var(--primario); box-shadow: 0 2px 6px rgba(0, 84, 153, 0.15); }
.acceso:disabled { opacity: 0.45; cursor: default; }
.acceso-icono { font-size: 1.4rem; }
.acceso-pendiente { border-style: dashed; }

/* ---------- Ventanas y mensajes ---------- */
.modal-fondo {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}
.ventana, .ventana-pagina {
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.ventana { width: 100%; max-width: 640px; }
.ventana-chica { max-width: 400px; }
.ventana-pagina { max-width: 640px; margin: 2rem auto; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.ventana-titulo { padding: 0.7rem 1rem; background: var(--primario); color: #fff; font-weight: 600; }
.ventana-cuerpo { padding: 1rem; }
.ventana-pie { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1rem; background: #F8F9FA; border-top: 1px solid var(--borde); }
/* Formularios de edición como ventana emergente sobre su lista */
.ventana.ventana-edicion { max-width: 820px; max-height: 92vh; overflow: auto; padding: 1rem 1.1rem; }
.ventana.ventana-edicion-ancha { max-width: 1200px; }
.ventana-edicion .edicion { height: auto; }
.ventana.ventana-edicion-completa { max-width: none; width: calc(100vw - 32px); height: calc(100vh - 32px); max-height: none; display: flex; flex-direction: column; }
@media (min-width: 1101px) {
    .ventana-edicion-completa > .edicion { flex: 1; height: auto; min-height: 0; }
    .ventana-edicion-completa .barra-acciones { position: static; margin-bottom: 0; }
    /* Rendición: las dos tablas (gastos e ingresos) se reparten el alto */
    .ventana-edicion-completa .bienes-control { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; }
    .ventana-edicion-completa .bienes-control:has(+ .bienes-control) { flex: 2; }   /* gastos: más filas que ingresos */
    .ventana-edicion-completa .bienes-control > * { width: 100%; }
    .ventana-edicion-completa .bienes-control .tabla-detalle { flex: 1; max-height: none; min-height: 120px; overflow: auto; }
}
.ventana-edicion .barra-acciones { position: sticky; bottom: -1rem; background: #fff; padding: 0.5rem 0; margin-bottom: -0.5rem; z-index: 1; }
.pendiente { text-align: center; }
.pendiente p { margin: 0.5rem 0 1rem; }

.formulario { display: grid; gap: 0.35rem; }
.formulario label { font-weight: 600; margin-top: 0.4rem; }
.formulario input { padding: 0.45rem 0.6rem; border: 1px solid var(--borde); border-radius: 4px; }
.formulario input:focus { outline: 0; border-color: var(--primario); box-shadow: 0 0 0 3px rgba(0, 84, 153, 0.15); }
.formulario input[readonly] { background: #F1F3F5; }

.boton {
    display: inline-block; padding: 0.45rem 1rem;
    border: 1px solid var(--borde); border-radius: 4px; background: #fff; color: var(--texto);
    cursor: pointer; text-decoration: none;
}
.boton:hover:not(:disabled) { background: #F1F3F5; }
.boton:disabled { opacity: 0.6; cursor: default; }
.boton-principal { background: var(--primario); border-color: var(--primario); color: #fff; }
.boton-principal:hover:not(:disabled) { background: var(--oscuro); }

.mensaje { padding: 0.5rem 0.75rem; border-radius: 4px; background: #E7F1FA; color: var(--oscuro); }
.mensaje-ok { background: #E6F6EC; color: #1B5E20; }
.mensaje-error { background: #FDECEA; color: var(--error); }

/* ---------- Maestros y avisos ---------- */
.maestro, .edicion { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; min-height: 0; }
.maestro-titulo { font-size: 1.2rem; font-weight: 600; color: var(--oscuro); display: flex; align-items: center; gap: 0.75rem; }
.aviso { padding: 0.55rem 0.9rem; border-radius: 6px; cursor: pointer; white-space: pre-line; border-left: 5px solid; }
.aviso-ok { background: #E6F6EC; color: #1B5E20; border-color: var(--acento); }
.aviso-error { background: #FDECEA; color: var(--error); border-color: var(--error); }
.aviso-advertencia { background: #FFF4E5; color: #8A4B00; border-color: #F0A030; }
.aviso-info { background: #E7F1FA; color: var(--oscuro); border-color: var(--primario); }
.confirmacion-texto { white-space: pre-line; }

.saldos-cuenta { display: flex; flex-direction: column; gap: 0.35rem; }
.saldo-cuenta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.4rem; padding: 0.45rem 0.8rem; background: #E7F1FA; border: 1px solid #C9DDF0; border-left: 5px solid var(--primario); border-radius: 6px; color: var(--oscuro); }
.saldo-cuenta .saldo-nombre { font-weight: 600; }
.saldo-negativo { color: var(--error); }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.6rem 0.8rem; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
.filtros label { display: flex; align-items: center; gap: 0.4rem; }
.filtros input, .filtros select, .panel-filtros input, .panel-filtros select, .cabecera input, .cabecera select {
    padding: 0.35rem 0.5rem; border: 1px solid var(--borde); border-radius: 4px; background: #fff;
}
.filtros .buscar { flex: 1; min-width: 200px; }

.tabla-contenedor { flex: 1; min-height: 200px; overflow: auto; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { position: sticky; top: 0; z-index: 1; background: #E9EEF5; color: var(--oscuro); text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #E5E9EF; }
.tabla tbody tr { cursor: default; }
.tabla tbody tr:hover { background: #F3F7FC; }
.tabla tbody tr.seleccionada, .tabla tbody tr.seleccionada:hover { background: var(--primario); color: #fff !important; }
.tabla .ordenable { cursor: pointer; user-select: none; }
.tabla .centro { text-align: center; }
.tabla .negrita { font-weight: 700; }
.tabla .vacio { text-align: center; color: var(--tenue); padding: 1.5rem; }
.fila-confirmada { color: #1E8449; }
.fila-pendiente { color: #C0392B; }

.barra-acciones { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.barra-acciones .contador, .barra-acciones .nota { margin-right: auto; color: var(--tenue); }
.barra-acciones .exportar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-right: auto; }
.barra-acciones .exportar .nota { margin-right: 0; }

/* Anexos del maestro (GroSemestral / GroAnual de escritorio) */
.anexos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.5rem; padding: 0.45rem 0.8rem; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
.anexos-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.4rem; }
.anexos-titulo { font-weight: 600; color: var(--oscuro); margin-right: 0.2rem; }
.enlace { background: none; border: none; padding: 0.15rem 0.35rem; color: var(--primario); text-decoration: underline; cursor: pointer; font: inherit; border-radius: 3px; }
.enlace:hover:not(:disabled) { background: #E7F1FA; }
.enlace:disabled { color: var(--tenue); text-decoration: none; cursor: default; }

.estado-etiqueta { font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 10px; color: #fff; }
.estado-pendiente { background: #C0392B; }
.estado-confirmado { background: #1E8449; }

/* ---------- Edición de la asignación ---------- */
.cabecera {
    display: grid; grid-template-columns: auto auto 1fr 1fr; gap: 0.5rem 1rem; align-items: end;
    margin: 0; padding: 0.7rem 0.9rem; background: #fff; border: 1px solid var(--borde); border-radius: 6px;
}
.cabecera label { display: flex; flex-direction: column; gap: 0.2rem; font-weight: 600; font-size: 0.85rem; }
.cabecera label.casilla { flex-direction: row; align-items: center; font-weight: 400; }
.cabecera .corto { width: 6rem; }
.cabecera .ancho-total { grid-column: 1 / 4; }
.cabecera input:disabled, .cabecera select:disabled { background: #F1F3F5; color: var(--texto); }

.listas { flex: 1; min-height: 360px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; }
.panel-lista { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; border: 1px solid var(--borde); border-radius: 6px; padding: 0.5rem; gap: 0.4rem; }
.panel-titulo { font-weight: 600; color: var(--primario); }
.panel-filtros { display: flex; gap: 0.4rem; }
.panel-filtros input { flex: 1; min-width: 0; }
.panel-filtros select { max-width: 45%; }
.panel-ayuda { font-size: 0.8rem; }
.botones-transferir { display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; }
.botones-transferir .boton { min-width: 3rem; font-size: 1rem; }

.lista-bienes { flex: 1; min-height: 240px; overflow: auto; border: 1px solid #E5E9EF; outline: none; }
.lista-bienes:focus { border-color: var(--primario); }
.tabla-chica { table-layout: fixed; font-size: 0.75rem; }
.tabla-chica th { padding: 0.3rem 0.35rem; white-space: normal; line-height: 1.15; }
.tabla-chica td { padding: 0 0.35rem; height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabla-chica .col-numero { width: 3rem; text-align: right; color: var(--tenue); }
.tabla-chica tr.seleccionada .col-numero { color: #fff; }
.fila-nueva { color: #1E8449; font-weight: 700; }
.lista-bienes, .tabla-chica { user-select: none; }

/* ---------- Registro de Bienes ---------- */
.filtro-procedencia { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.8rem; }
.filtros label.casilla { gap: 0.25rem; font-weight: 400; }
.filtros label.casilla.negrita { font-weight: 600; }
.tabla-bienes { font-size: 0.85rem; table-layout: fixed; }
.tabla-bienes th { white-space: normal; line-height: 1.15; vertical-align: bottom; padding: 0.4rem 0.35rem; }
.tabla-bienes td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0.35rem 0.35rem; }
.texto-activo { color: #27AE60; }
.texto-baja { color: #C0392B; }
.tabla tbody tr.seleccionada .texto-activo, .tabla tbody tr.seleccionada .texto-baja { color: #fff; }
.edicion-bien { height: auto; }
.ficha-bien { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ficha-bien legend { font-weight: 600; color: var(--primario); padding: 0 0.3rem; }
.ficha-bien .ancho-2 { grid-column: span 2; }
.ficha-bien .ancho-3 { grid-column: span 3; }
.ficha-bien .ancho-total { grid-column: 1 / -1; }
.ficha-bien input, .ficha-bien select, .ficha-bien textarea { width: 100%; font: inherit; font-weight: 400; }
.ficha-bien textarea { padding: 0.35rem 0.5rem; border: 1px solid var(--borde); border-radius: 4px; resize: vertical; }
.ficha-bien input[type=checkbox] { width: auto; }
.ficha-bien label.casilla { gap: 0.4rem; align-self: end; padding-bottom: 0.4rem; }
.ficha-bien input[readonly] { background: #F1F3F5; }
.ficha-bien input:disabled { background: #F1F3F5; }

/* Ingreso y Salida de Bienes: rojo = pendiente, ámbar = salió y falta retornar, verde = retornado */
.fila-por-retornar { color: #B06A00; }
.fila-retornada { color: #1E8449; }
.estado-por-retornar { background: #B06A00; }
.tabla-control { font-size: 0.85rem; }
.tabla-control td { white-space: nowrap; }
.tabla-control .recortado { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.tabla-control td.retorno-vencido { background: #FFE4E4; color: #C00000; font-weight: 700; }
.tabla tbody tr.seleccionada td.retorno-vencido { background: #FFE4E4; color: #C00000; }
.bienes-control .tabla-detalle { max-height: 320px; overflow: auto; border: 1px solid var(--borde); border-radius: 4px; }
.tabla-detalle .tabla { font-size: 0.82rem; }
.tabla-detalle td { padding: 0.15rem 0.2rem; }
.tabla-detalle td.item { background: #F0F3F7; width: 2.5rem; }
.tabla-detalle input, .tabla-detalle select { min-width: 4rem; padding: 0.2rem 0.3rem; }
.tabla-detalle input.mayus { text-transform: uppercase; }
.tabla-detalle input[type=checkbox] { min-width: 0; width: 1rem; height: 1rem; cursor: pointer; }
.tabla tbody tr.seleccionada-suave { background: #E3F0FF; }
input.negrita { font-weight: 700; }
.boton-mini { padding: 0.15rem 0.45rem; min-width: 0; }
.acciones-bienes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.retorno-real { color: #1E8449; font-weight: 600; }
.ventana.ventana-ancha { max-width: 1000px; }
.buscar-ancho { width: 100%; margin-bottom: 0.5rem; padding: 0.4rem 0.6rem; border: 1px solid var(--borde); border-radius: 4px; font: inherit; }
.tabla-busqueda { max-height: 50vh; overflow: auto; font-size: 0.85rem; }
.tabla-busqueda td { white-space: nowrap; cursor: default; }
.tabla tbody tr.ya-agregado { color: #8A94A3; }
.ficha-horario { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabla td.celda-recortada { max-width: 24rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campo-con-boton { display: flex; gap: 0.3rem; align-items: stretch; }
.campo-con-boton input { flex: 1; min-width: 0; }
.ficha-bien textarea { width: 100%; resize: vertical; font: inherit; font-weight: 400; }

/* Asistencia: rojo = sin marcaciones, ámbar = con motivo, tardanzas en rojo sobre rosado, totales al pie */
.tabla-asistencia { font-size: 0.82rem; }
.tabla-asistencia td { white-space: nowrap; }
.tabla-asistencia td.celda-recortada { max-width: 14rem; }
/* Profesionales: mismo documento registrado con otro nombre (por corregir) */
.tabla tbody tr.fila-nombre-distinto { background: #FFE9B8; color: #8A4B00; }
.tabla tbody tr.fila-nombre-distinto:hover { background: #FFDD94; }
.tabla tbody tr.seleccionada.fila-nombre-distinto { background: var(--primario); color: #fff; }
.muestra-nombre-distinto { display: inline-block; width: .9em; height: .9em; background: #FFE9B8; border: 1px solid #E0A93A; vertical-align: -.1em; }
.fila-falta { color: #C0392B; }
.fila-justificada { color: #B06A00; }
.tabla td.tardanza, .tabla tbody tr.seleccionada td.tardanza { background: #FFE4E4; color: #C00000; font-weight: 700; }
.tabla tfoot td { position: sticky; bottom: 0; background: #E9EEF5; font-weight: 700; padding: 0.45rem 0.5rem; border-top: 1px solid var(--borde); white-space: nowrap; }
.tabla tfoot td.total-rojo { color: #C00000; }
.leyenda { margin-left: 1rem; font-size: 0.8rem; }
.leyenda span { margin-right: 0.6rem; }
.leyenda .leyenda-tardanza { color: #C00000; background: #FFE4E4; font-weight: 700; padding: 0 0.2rem; }
.boton-peligro { color: #C0392B; }
.procesar-grilla { display: grid; grid-template-columns: max-content 10rem; gap: 0.5rem 1rem; align-items: center; }
.procesar-grilla label.casilla { display: flex; align-items: center; gap: 0.4rem; }
.procesar-grilla input[type=time], .procesar-grilla select { padding: 0.35rem 0.5rem; border: 1px solid var(--borde); border-radius: 4px; font: inherit; }
.procesar-grilla select { width: 18rem; }
.dato-dia { align-self: end; padding-bottom: 0.45rem; font-weight: 600; }
.texto-fin-semana { color: #B06A00; }
.tabla td.celda-error { background: #FFE4E4; color: #C00000; font-weight: 700; }
.tabla td.celda-valida { background: #C6EFCE; }
.filtros-ventana { border: none; padding: 0 0 0.6rem; }
.tabla-resumen { max-height: 55vh; }
.tabla td.a-favor { color: #1E8449; font-weight: 700; }

.formulario-2col { grid-template-columns: max-content 1fr; align-items: center; column-gap: 0.75rem; }
.formulario-2col label { margin-top: 0; }
.formulario select, .formulario textarea { padding: 0.45rem 0.6rem; border: 1px solid var(--borde); border-radius: 4px; width: 100%; font: inherit; }
.formulario label.casilla { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; }
.dato-fijo { padding: 0.3rem 0; }

@media (max-width: 1100px) {
    .edicion { height: auto; }
    .listas { grid-template-columns: 1fr; flex: none; min-height: 0; }
    .lista-bienes { flex: none; height: 340px; }
    .botones-transferir { flex-direction: row; justify-content: center; }
    .cabecera { grid-template-columns: 1fr 1fr; }
    .cabecera .ancho-total { grid-column: 1 / -1; }
    .ficha-bien .ancho-2, .ficha-bien .ancho-3 { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .area-trabajo { padding: 0.75rem; }
    .barra-estado { gap: 0.6rem; }
    .barra-estado-derecha { margin-left: 0; }
}

/* Registro de Gastos */
.tabla-gastos td { white-space: nowrap; }
.tabla-gastos .recortado { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tabla td.derecha, input.derecha { text-align: right; }
.ficha-bien input.celda-error { background: #FFE4E4; color: #C00000; font-weight: 700; }
.campo-con-boton a.boton-mini { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
/* Registro de Perfiles: opciones del menú con casillas, por grupo */
.accesos-perfil { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.75rem; }
.accesos-grupo { border: 1px solid var(--borde); border-radius: 6px; padding: 0.4rem 0.6rem 0.5rem; }
.accesos-grupo legend { font-weight: 600; color: var(--primario); padding: 0 0.3rem; }
.cabecera .accesos-grupo label { flex-direction: row; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45rem; padding: 0.18rem 0; font-weight: 400; cursor: pointer; }
.cabecera .accesos-grupo label.accesos-todos { font-weight: 600; border-bottom: 1px solid var(--borde); margin-bottom: 0.2rem; }
.accesos-grupo .pendiente-web { color: var(--tenue); font-size: 0.85em; }.accesos-grupo input[type=checkbox] { width: auto; margin: 0; }

/* «Salir» de la barra superior: blanco sobre la barra azul (.enlace general lo pinta del color primario) */
.barra-menu-usuario .enlace { color: #fff; font-weight: 600; border: 1px solid rgba(255,255,255,0.6); border-radius: 4px; padding: 0.2rem 0.7rem; text-decoration: none; }
.barra-menu-usuario .enlace:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
.formulario label.casilla input[type=checkbox] { padding: 0; width: auto; }
