/* Repositorio de Planos y Obras — misma línea visual que dirinfo y Consultas CONEAU
   (paleta, tipografías Unbounded + Plus Jakarta Sans, botones redondeados). */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans.woff2) format('woff2');
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(fonts/unbounded.woff2) format('woff2');
}

:root {
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --paper: #F2F6FB;
  --paper-raise: #FFFFFF;
  --ink: #0F2038;
  --ink-soft: #435671;
  --navy: #1B3868;
  --navy-deep: #0B1730;
  --navy-deep-2: #060D1C;
  --sky: #0E9FD6;
  --sky-strong: #0B87B8;
  --sky-dim: rgba(14, 159, 214, 0.14);
  --line: rgba(15, 32, 56, 0.16);
  --line-soft: rgba(15, 32, 56, 0.08);
  --on-dark: #EFF5FC;
  --on-dark-soft: rgba(239, 245, 252, 0.68);
  --on-dark-line: rgba(239, 245, 252, 0.16);

  --carpeta: #1B3868;
  --ok: #1B7F4B;
  --ok-bg: rgba(27, 127, 75, 0.12);
  --bad: #B3261E;
  --bad-bg: rgba(179, 38, 30, 0.10);
  --warn: #8A5A00;
  --warn-bg: rgba(214, 150, 14, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--sky-strong); }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); margin: 0; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 600; margin-bottom: 14px; }
h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

.envoltura { max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sky-strong); margin: 0 0 6px;
}
.nota { color: var(--ink-soft); font-size: 13.5px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- íconos ---------- */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ico .relleno { fill: currentColor; stroke: none; }

/* ---------- encabezado ---------- */
header.sitio {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--on-dark-line);
}
header.sitio .envoltura { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
header.sitio .marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
header.sitio .marca img { height: 32px; width: auto; display: block; border-radius: 3px; }
header.sitio .marca .nombre { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--on-dark); }
header.sitio .marca .nombre b { color: var(--sky); font-weight: 700; }
header.sitio .marca .sub { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); }
header.sitio nav { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
header.sitio nav > a:not(.boton-salir) { font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--on-dark-soft); transition: color .2s ease; }
header.sitio nav > a:hover, header.sitio nav > a[aria-current="page"] { color: var(--on-dark); }
header.sitio nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sky); padding-bottom: 2px; }
header.sitio .usuario { display: flex; align-items: center; gap: 12px; padding-left: 18px; border-left: 1px solid var(--on-dark-line); }
header.sitio .usuario .quien { font-size: 13px; color: var(--on-dark-soft); line-height: 1.3; text-align: right; }
header.sitio .usuario .quien b { display: block; color: var(--on-dark); font-weight: 600; }
.boton-salir {
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
  color: var(--sky); background: none; border: 1px solid var(--on-dark-line); border-radius: 6px; padding: 6px 14px;
  transition: background .2s ease, color .2s ease;
}
.boton-salir:hover { background: rgba(239, 245, 252, .08); color: var(--on-dark); }
form.en-linea { display: inline; margin: 0; }

main.envoltura { padding-top: 30px; padding-bottom: 64px; width: 100%; }

/* ---------- tarjetas y títulos ---------- */
.tarjeta {
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 22px;
}
.titulo-con-accion { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.titulo-con-accion h1, .titulo-con-accion h2 { margin: 0; }
.formulario-angosto { max-width: 780px; }

.migas { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13.5px; margin-bottom: 18px; color: var(--ink-soft); }
.migas a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.migas a:hover { color: var(--sky-strong); text-decoration: underline; }
.migas [aria-current] { color: var(--navy); font-weight: 700; }
.migas .ico { width: 14px; height: 14px; vertical-align: 0; opacity: .6; }

/* ---------- avisos ---------- */
.aviso { padding: 11px 16px; border-radius: 6px; margin: 0 0 16px; font-size: 14.5px; }
.aviso.error { background: var(--bad-bg); color: var(--bad); }
.aviso.ok { background: var(--ok-bg); color: var(--ok); }
.aviso.info { background: var(--sky-dim); color: var(--navy); }
.envoltura-aviso { max-width: 1320px; margin: 18px auto 0; }

/* ---------- formularios ---------- */
form label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 14.5px; }
form label small, fieldset small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=password], input[type=search], textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 14px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper-raise);
  border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-dim); }
input:disabled { background: var(--paper); color: var(--ink-soft); }
input[type=radio], input[type=checkbox] { accent-color: var(--sky-strong); width: 16px; height: 16px; vertical-align: -2px; margin: 0 8px 0 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 16px; padding: 12px 18px 14px; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px; color: var(--navy); }
label.opcion { font-weight: 500; margin: 6px 0 14px; }
label.interruptor { background: var(--paper); border-radius: 8px; padding: 12px 14px; }
.dos-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

button, .boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--navy-deep-2); background: var(--sky);
  border: 0; border-radius: 6px; padding: 10px 22px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
button:hover, .boton:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(14, 159, 214, .35); }
.boton.secundario { background: var(--paper-raise); color: var(--navy); border: 1px solid var(--line); }
.boton.secundario:hover { box-shadow: none; background: var(--sky-dim); }
.boton.peligro, .boton-icono.peligro { color: var(--bad); }
.boton.secundario.peligro:hover { background: var(--bad-bg); }
.boton-chico { font-size: 13px; padding: 6px 14px; }
.boton-icono {
  background: none; border: 0; padding: 6px; border-radius: 6px; color: var(--ink-soft); line-height: 0;
}
.boton-icono:hover { background: var(--line-soft); transform: none; box-shadow: none; }
.acciones { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zona-peligro { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* ---------- tablas ---------- */
.tabla-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--paper-raise); }
th {
  text-align: left; background: var(--paper);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft);
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(14, 159, 214, .04); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.inactivo td { color: var(--ink-soft); }
td.acciones-fila { white-space: nowrap; text-align: right; }
td.acciones-fila > * { margin-left: 6px; }
td.acciones-fila a { color: var(--ink-soft); }
td.acciones-fila a:hover { color: var(--sky-strong); }
.etiqueta-rol {
  display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 6px;
  background: var(--sky-dim); color: var(--navy);
}
.etiqueta-rol.admin { background: var(--navy); color: var(--on-dark); }

dl.datos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
dl.datos dt { color: var(--ink-soft); }
dl.datos dd { margin: 0; font-weight: 600; }
dl.datos dd.normal { font-weight: 400; }

.estado {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--line-soft); color: var(--ink-soft);
}
.estado-proyecto { background: var(--sky-dim); color: var(--navy); }
.estado-licitacion { background: var(--warn-bg); color: var(--warn); }
.estado-en_ejecucion { background: rgba(27, 56, 104, .12); color: var(--navy); }
.estado-finalizada { background: var(--ok-bg); color: var(--ok); }

/* Insignias de tipo de archivo */
.ext {
  display: inline-block; min-width: 40px; text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px; color: #fff; background: #6B7A90; line-height: 1.5;
}
.ext-pdf { background: #C8372D; }
.ext-cad { background: #0B87B8; }
.ext-img { background: #7A4FB5; }
.ext-zip { background: #8A6A1E; }
.ext-doc { background: #2B5DB5; }
.ext-xls { background: #1B7F4B; }

/* ---------- login ---------- */
body.pagina-login {
  align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(120% 90% at 50% 30%, #14284c 0%, var(--navy-deep) 55%, var(--navy-deep-2) 100%);
}
body.pagina-login main { width: 100%; max-width: 420px; flex: none; }
.login {
  background: var(--paper-raise); border-radius: 12px; padding: 34px 34px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.login .escudo { display: block; height: 128px; width: auto; margin: 0 auto 18px; }
.login h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login h1 b { color: var(--sky-strong); }
.login .bajada { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin: 0 0 22px; }
.login button { width: 100%; margin-top: 4px; }
.login .captcha { margin: 4px 0 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; }
.login .captcha-titulo { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.login .captcha-imagen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.login .captcha-imagen img { border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.login .captcha-imagen button { width: auto; margin: 0; }
.login .captcha label { margin-bottom: 0; }
.login .captcha input { text-transform: uppercase; letter-spacing: .2em; }
.login .pie-login { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin: 18px 0 0; }

.usuarios-prueba { display: grid; gap: 10px; }
.usuarios-prueba button.boton {
  width: 100%; margin: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 11px 16px; white-space: normal; text-align: left;
}
.usuarios-prueba button b { font-size: 15px; }
.usuarios-prueba button span { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }

/* ---------- ubicación con Google Maps ---------- */
.campo-ubicacion label.direccion { margin: 12px 0 8px; }
.buscador-mapa gmp-place-autocomplete { width: 100%; }
.mapa-obra { height: 340px; margin: 10px 0 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.mapa-obra.mapa-error { height: auto; padding: 14px 16px; color: var(--bad); background: var(--bad-bg); font-size: 14px; }

/* ---------- PDF de la obra y enlaces para compartir ---------- */
.pdfs-obra { margin-top: 6px; }
.pdfs-obra .titulo-con-accion { margin: 22px 0 10px; }
.pdfs-obra .titulo-con-accion .titulo-seccion { margin: 0; }
.lista-pdfs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.lista-pdfs > li { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.lista-pdfs > li:last-child { border-bottom: 0; }
.lista-pdfs > li:target { background: var(--sky-dim); }
.pdf-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdf-datos { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
.pdf-datos a { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pdf-datos a:hover { color: var(--sky-strong); text-decoration: underline; }
.pdf-datos .nota { font-size: 12.5px; }
.acciones-archivo { align-items: center; flex-wrap: wrap; }
.enlace-compartido { margin-top: 10px; padding: 10px 12px; background: var(--paper); border-radius: 8px; }
.enlace-compartido label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ok); margin: 0 0 6px; }
.enlace-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.enlace-fila input { flex: 1; min-width: 220px; margin: 0; font-size: 13px; padding: 7px 10px; background: var(--paper-raise); }
/* tarjeta con los PDF de la obra: enlace de todos arriba, lista desplegable abajo */
.caja-pdfs { background: var(--paper-raise); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.caja-pdfs-cabecera { padding: 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.caja-pdfs-cabecera:target { background: var(--sky-dim); }
.caja-pdfs-cabecera label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ok); margin: 0 0 6px; }
.caja-pdfs-cabecera.crear { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin: 0; }
.caja-pdfs-cabecera.crear .nota { font-size: 12.5px; }
.caja-pdfs-vacia { margin: 0; padding: 12px 14px; }
.pdfs-desplegable > summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none; user-select: none;
}
.pdfs-desplegable > summary::-webkit-details-marker { display: none; }
.pdfs-desplegable > summary:hover { background: var(--paper); }
.pdfs-desplegable > summary .nota { font-size: 12.5px; margin-left: auto; }
.pdfs-desplegable > summary .ico { width: 18px; height: 18px; color: var(--ink-soft); transform: rotate(-90deg); transition: transform .15s ease; }
.pdfs-desplegable[open] > summary { border-bottom: 1px solid var(--line-soft); }
.pdfs-desplegable[open] > summary .ico { transform: none; }
.caja-pdfs .lista-pdfs { border: 0; border-radius: 0; }
/* enlace de cada PDF: plegado debajo de la fila */
.enlace-pdf { margin-top: 6px; }
.enlace-pdf > summary {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 600; color: var(--ok);
}
.enlace-pdf > summary::-webkit-details-marker { display: none; }
.enlace-pdf > summary .ico { width: 15px; height: 15px; }
.enlace-pdf > summary .ico-abajo { transition: transform .15s ease; }
.enlace-pdf[open] > summary .ico-abajo { transform: rotate(180deg); }
.enlace-pdf .enlace-compartido { margin-top: 6px; }
.enlace-pdf .enlace-compartido label { color: var(--ink-soft); font-weight: 500; }

/* página pública con todos los PDF de una obra */
.compartido.compartido-lista { max-width: 760px; }
.compartido-lista .lista-pdfs { margin-top: 22px; text-align: left; }
.compartido-lista .acciones-archivo { display: flex; gap: 8px; }

/* página pública de un PDF compartido */
.compartido { max-width: 620px; margin: 30px auto; text-align: center; padding: 34px 30px; }
.compartido .compartido-icono .ico { width: 54px; height: 54px; stroke-width: 1.3; color: #C8372D; }
.compartido h1 { font-size: 20px; margin: 4px 0 6px; overflow-wrap: anywhere; }
.compartido .nota { margin: 2px 0; }
.compartido .acciones { justify-content: center; margin-top: 20px; }
.compartido .pie-compartido { margin: 24px 0 0; font-size: 12px; color: var(--ink-soft); }

/* ---------- permisos ---------- */
.permisos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.permisos label.opcion { margin: 4px 0 8px; }
.nivel { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.nivel-ninguno { color: var(--ink-soft); }
.nivel-ver { background: var(--sky-dim); color: var(--navy); }
.nivel-editar { background: var(--navy); color: var(--on-dark); }

/* ---------- franja de maqueta ---------- */
.franja-maqueta { background: #FFF4D6; border-bottom: 1px solid #E9C76A; color: #5C4400; font-size: 13.5px; }
.franja-maqueta .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
.franja-maqueta .boton-salir { color: #5C4400; border-color: #D9B24F; font-size: 12.5px; padding: 4px 12px; }
.franja-maqueta .boton-salir:hover { background: #FBE7AE; color: #3D2D00; }

/* ---------- portada pública ---------- */
.portada {
  background: radial-gradient(120% 120% at 20% 0%, #14284c 0%, var(--navy-deep) 60%, var(--navy-deep-2) 100%);
  color: var(--on-dark);
  padding: 54px 0 62px;
}
.portada h1 { color: var(--on-dark); font-size: clamp(24px, 3.4vw, 38px); line-height: 1.2; max-width: 900px; margin-bottom: 12px; }
.portada h1 b { color: var(--sky); font-weight: 600; }
.portada .eyebrow { color: var(--sky); }
.portada-titulo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.plano-card .marca-borrador {
  position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: #FFF4D6; color: #5C4400; border-radius: 4px; padding: 2px 8px;
}
.plano-card.es-borrador .lamina { filter: grayscale(.7); }
.portada .bajada { color: var(--on-dark-soft); max-width: 680px; margin: 0 0 26px; font-size: 16px; }
.buscador-grande {
  display: flex; align-items: center; gap: 10px; max-width: 820px;
  background: var(--paper-raise); border-radius: 12px; padding: 6px 6px 6px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.buscador-grande .ico { color: var(--ink-soft); width: 22px; height: 22px; }
.buscador-grande input[type=search] { border: 0; margin: 0; font-size: 16.5px; padding: 12px 4px; box-shadow: none; }
.buscador-grande button { padding: 12px 26px; border-radius: 8px; }

.contenido-inicio { padding-top: 22px; padding-bottom: 64px; }

/* ---------- portada: Bocetos de la Ciudad Universitaria ---------- */
:root {
  --unt-navy: #35467D; --unt-sky: #62ADEC;              /* logo UNT 2025 */
  --sepia: #F4ECDD; --sepia-ink: #6B5233; --sepia-line: rgba(107, 82, 51, .22);
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, Menlo, monospace;
}
.portada-bocetos {
  position: relative; overflow: hidden; padding: 56px 0 64px;
  background: radial-gradient(900px 420px at 85% 10%, rgba(98, 173, 236, .16), transparent 60%),
              linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-deep-2) 100%);
}
.portada-bocetos::before {   /* papel milimetrado */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(98, 173, 236, .07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(98, 173, 236, .07) 1px, transparent 1px),
                    linear-gradient(rgba(98, 173, 236, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(98, 173, 236, .035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
}
.portada-bocetos .envoltura { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: 40px; align-items: center; }
.portada-bocetos .eyebrow { letter-spacing: .18em; margin-bottom: 14px; }
.portada-bocetos h1 { font-size: clamp(30px, 4.2vw, 54px); line-height: 1.06; letter-spacing: -.02em; max-width: none; margin: 0; }
.portada-bocetos h1 span { display: block; }
.portada-bocetos h1 .acento { color: var(--unt-sky); }
.portada-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 20px 0 0; font: 500 13px/1.4 var(--font-mono); color: var(--on-dark-soft); }
.portada-meta span { display: inline-flex; align-items: center; gap: 8px; }
.portada-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--unt-sky); }
.portada-bajada { margin: 22px 0 0; max-width: 68ch; font-size: 17.5px; line-height: 1.62; color: var(--on-dark); }
.portada-bajada sup a { font: 600 11px/0 var(--font-mono); color: var(--unt-sky); text-decoration: none; padding: 0 1px; }
.portada-bajada sup a:hover { text-decoration: underline; }
.portada-bajada em { font-style: normal; border-bottom: 1px dashed rgba(98, 173, 236, .6); }
.portada-bocetos .boton { margin-top: 22px; }
.collage { position: relative; height: 430px; }
.lamina-collage {
  position: absolute; margin: 0; background: var(--sepia); padding: 10px; border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 24px 50px -18px rgba(0, 0, 0, .65), 0 6px 14px rgba(0, 0, 0, .35);
}
.lamina-collage img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 2px; }
.lamina-collage::after {   /* chinche */
  content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9fd0f7, var(--sky-strong)); box-shadow: 0 2px 4px rgba(0, 0, 0, .45);
}
.lamina-collage.l1 { width: 58%; height: 78%; left: 0; top: 6%; transform: rotate(-4deg); }
.lamina-collage.l2 { width: 52%; height: 62%; right: 2%; top: 0; transform: rotate(3.5deg); }
.lamina-collage.l3 { width: 50%; height: 46%; right: 10%; bottom: 2%; transform: rotate(-1.5deg); }

.proximamente { background: var(--sepia); border-bottom: 1px solid var(--sepia-line); color: var(--sepia-ink); }
.proximamente .envoltura { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.proximamente p { margin: 0; font-size: 15px; line-height: 1.5; }
.proximamente strong { color: #4B3A22; }
.etiqueta-prox {
  flex: none; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  background: var(--sepia-ink); color: var(--sepia); padding: 6px 9px; border-radius: 999px;
}

.barra-busqueda {
  background: var(--paper-raise); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
}
.buscador { min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px 0 14px; height: 48px; background: #fff; }
.buscador .ico { color: var(--ink-soft); flex: none; }
.buscador input[type=search] { flex: 1; border: 0; margin: 0; padding: 0; box-shadow: none; font-size: 15px; min-width: 0; background: transparent; }
.buscador button { height: 38px; padding: 0 18px; font-size: 14px; border-radius: 8px; }
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px dashed var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: var(--paper); cursor: not-allowed;
}
.chip small { font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: var(--sepia-ink); background: var(--sepia); padding: 4px 6px; border-radius: 999px; }
.filtro-estado { margin: 0; }
.filtro-estado select { margin: 0; height: 40px; padding: 0 12px; font-size: 13.5px; width: auto; }
.encabezado-resultados { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin: 28px 2px 16px; }
.encabezado-resultados h2 { font-size: 20px; margin: 0; }
.encabezado-resultados p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.encabezado-resultados b { color: var(--ink); }
.encabezado-resultados .selector-vista { margin-left: auto; }

.notas { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.notas h2 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 14px; }
.notas ol { margin: 0; padding-left: 22px; max-width: 92ch; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.notas li { margin: 0 0 10px; padding-left: 4px; }
.notas li::marker { font: 600 13px var(--font-mono); color: var(--unt-navy); }
.notas li:target { background: rgba(98, 173, 236, .14); border-radius: 6px; }
.notas a.volver { text-decoration: none; color: var(--sky-strong); font-weight: 700; margin-left: 4px; }

@media (max-width: 900px) {
  .portada-bocetos { padding: 40px 0 48px; }
  .portada-bocetos .envoltura { grid-template-columns: 1fr; gap: 28px; }
  .collage { height: 300px; max-width: 520px; }
  .barra-busqueda { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .portada-bajada { font-size: 16px; }
  .proximamente .envoltura { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .collage { height: 230px; }
  .buscador button { padding: 0 14px; }
}

/* barra de filtros (portada, obras, gestión) */
.barra-filtros {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  background: var(--paper-raise); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
}
.barra-filtros .filtros { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; }
.barra-filtros label { margin: 0; }
.barra-filtros label > span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.barra-filtros select, .barra-filtros input[type=search] { margin-top: 4px; font-size: 14.5px; padding: 8px 12px; min-width: 170px; width: auto; max-width: 320px; }
.barra-filtros .buscar-obra input { min-width: 300px; }
.barra-filtros .limpiar { font-size: 13.5px; font-weight: 600; padding-bottom: 9px; }
.barra-filtros .resultado { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.barra-filtros .cuenta { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.selector-vista { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.selector-vista button { background: var(--paper-raise); color: var(--ink-soft); border-radius: 0; padding: 7px 10px; }
.selector-vista button:hover { transform: none; box-shadow: none; background: var(--paper); }
.selector-vista button[aria-pressed="true"] { background: var(--navy); color: var(--on-dark); }

/* tarjetas de planos */
.planos.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.plano-card {
  display: flex; flex-direction: column; background: var(--paper-raise); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.plano-card:hover { box-shadow: 0 14px 34px rgba(15, 32, 56, .12); transform: translateY(-2px); border-color: rgba(14, 159, 214, .5); }
.plano-card .lamina {
  position: relative; display: flex; align-items: center; justify-content: center; height: 138px; color: rgba(239, 245, 252, .85);
  background:
    linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(135deg, #1B3868, #0B5F7A);
}
.plano-card .lamina .ico { width: 54px; height: 54px; stroke-width: 1.2; }
/* Vista previa del JPG del plano; si no carga, queda visible el ícono de abajo. */
.plano-card .lamina { overflow: hidden; }
.planos.grilla .lamina:has(.vista-previa) { height: 190px; }
.plano-card .lamina .vista-previa { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #fff; transition: transform .3s ease; }
.plano-card:hover .lamina .vista-previa { transform: scale(1.04); }
.plano-card .lamina .exts, .plano-card .marca-borrador { z-index: 1; }
.plano-card .lamina .exts { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; }
.plano-card .plano-cuerpo { padding: 14px 16px 6px; flex: 1; }
.plano-card h2 { font-size: 15px; line-height: 1.35; margin: 0 0 6px; }
.plano-card h2 a { color: var(--navy); text-decoration: none; }
.plano-card h2 a:hover { color: var(--sky-strong); }
.plano-card .meta { font-size: 13px; color: var(--ink); margin: 0 0 2px; }
.plano-card .peso { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.plano-card .plano-acciones { display: flex; gap: 8px; padding: 10px 16px 16px; flex-wrap: wrap; }

.planos.lista { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper-raise); }
.planos.lista .plano-card { flex-direction: row; align-items: center; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.planos.lista .plano-card:last-child { border-bottom: 0; }
.planos.lista .plano-card:hover { transform: none; box-shadow: none; background: rgba(14, 159, 214, .04); }
.planos.lista .lamina { width: 92px; height: 64px; flex: none; margin: 8px 0 8px 12px; border-radius: 6px; }
.planos.lista .lamina .ico { width: 26px; height: 26px; }
.planos.lista .lamina .exts { display: none; }
.planos.lista .plano-cuerpo { padding: 10px 16px; }
.planos.lista .plano-acciones { padding: 10px 16px; flex-wrap: nowrap; }

.vacio { text-align: center; color: var(--ink-soft); padding: 56px 20px; border: 2px dashed var(--line); border-radius: 10px; background: var(--paper-raise); }
.vacio .ico { width: 44px; height: 44px; stroke-width: 1.3; color: var(--sky-strong); }
.vacio strong { color: var(--navy); }
.vacio p { margin: 8px 0 0; }
.vacio.chico { padding: 26px 16px; }
.vacio.chico .ico { width: 30px; height: 30px; }

.paginador { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.paginador a, .paginador span { min-width: 38px; text-align: center; padding: 7px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }
.paginador a { color: var(--navy); background: var(--paper-raise); border: 1px solid var(--line); }
.paginador a:hover { background: var(--sky-dim); }
.paginador [aria-current] { background: var(--navy); color: var(--on-dark); }
.paginador .salto { color: var(--ink-soft); min-width: 0; padding: 7px 2px; }

/* detalle de plano / lista de archivos */
.detalle-plano .descripcion { margin: 0 0 18px; max-width: 860px; }
.lista-archivos { list-style: none; margin: 0; padding: 0; }
.lista-archivos li {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line-soft);
}
.lista-archivos li:last-child { border-bottom: 0; }
.lista-archivos .nombre-archivo { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lista-archivos .nombre-archivo a { color: var(--ink); text-decoration: none; }
.lista-archivos .nombre-archivo a:hover { color: var(--sky-strong); text-decoration: underline; }
.lista-archivos .peso { font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.acciones-archivo { display: flex; gap: 8px; }
/* visor de planos */
.visor { padding: 14px; }
.visor-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.visor-nombre { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.visor-botones { display: flex; gap: 6px; flex-wrap: wrap; }
.visor-botones button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.visor-marco {
  height: min(72vh, 820px); overflow: hidden; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: 8px; cursor: zoom-in; user-select: none;
  display: flex; align-items: center; justify-content: center;
}
.visor-marco img { display: block; width: 100%; max-width: none; height: auto; max-height: 100%; object-fit: contain; }
.visor.ampliado .visor-marco { overflow: auto; display: block; cursor: grab; touch-action: none; }
.visor.ampliado .visor-marco img { max-height: none; }
.visor.cargando .visor-marco { cursor: progress; }
.visor.cargando .visor-marco img { opacity: .6; }
.visor-estado { margin: 8px 0 0; }
button.enlace { all: unset; color: var(--sky-strong); text-decoration: underline; cursor: pointer; font-weight: 600; }
.visor:fullscreen { display: flex; flex-direction: column; border-radius: 0; background: var(--paper-raise); }
.visor:fullscreen .visor-marco { flex: 1; height: auto; }
.editor-plano { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }

/* ---------- obras ---------- */
.grilla-obras { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.obra-card {
  display: flex; gap: 14px; padding: 16px 18px; background: var(--paper-raise); border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); transition: box-shadow .2s ease, border-color .2s ease;
}
.obra-card:hover { border-color: rgba(14, 159, 214, .55); box-shadow: 0 10px 26px rgba(15, 32, 56, .1); }
.obra-icono { color: var(--carpeta); }
.obra-icono .ico { width: 38px; height: 38px; }
.obra-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.obra-texto .expediente { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sky-strong); }
.obra-texto strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--navy); line-height: 1.35; margin: 2px 0 4px; }
.obra-texto .meta { font-size: 13px; color: var(--ink-soft); }
.obra-texto .pie-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* ---------- vista tipo Drive ---------- */
.drive { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.drive > * { min-width: 0; }
.drive-arbol {
  position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto;
  background: var(--paper-raise); border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}
.drive-arbol .raiz {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink-soft); font-size: 12.5px; line-height: 1.35; border-radius: 6px;
}
.drive-arbol .raiz b { display: block; color: var(--navy); font-size: 13.5px; }
.drive-arbol .raiz .ico { color: var(--sky-strong); margin-top: 2px; }
.drive-arbol .raiz[aria-current] { background: var(--sky-dim); }
.drive-arbol ul { list-style: none; margin: 0; padding: 0; }
.drive-arbol ul ul { padding-left: 16px; margin: 2px 0 4px 8px; border-left: 1px solid var(--line); }
.drive-arbol li a {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px;
  text-decoration: none; color: var(--ink); font-size: 13.5px; line-height: 1.3;
}
.drive-arbol li a:hover { background: var(--paper); }
.drive-arbol li a[aria-current] { background: var(--sky-dim); font-weight: 700; color: var(--navy); }
.drive-arbol li a .ico { color: var(--carpeta); width: 17px; height: 17px; }
.drive-arbol li a .ico-documento { color: var(--sky-strong); }
.drive-arbol .nombre { flex: 1; min-width: 0; }
.drive-arbol .cuenta { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--paper); border-radius: 999px; padding: 0 7px; }

.drive-principal {
  position: relative; background: var(--paper-raise); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px 26px; min-height: 420px;
}
.drive-principal.arrastrando { outline: 3px dashed var(--sky); outline-offset: -8px; background: #F4FBFE; }
.drive-principal.arrastrando::after {
  content: 'Soltá los archivos para subirlos'; position: absolute; inset: auto 0 22px; text-align: center;
  font-weight: 700; color: var(--sky-strong);
}
.drive-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.drive-cabecera h1 { margin: 0 0 2px; font-size: 21px; }
.drive-cabecera .nota { margin: 0; }
.datos-obra { background: var(--paper); border-radius: 8px; padding: 14px 18px; margin-bottom: 8px; }
.titulo-seccion {
  font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin: 22px 0 10px;
}
.grilla-carpetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.carpeta-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: var(--ink); background: var(--paper-raise); transition: background .15s ease, border-color .15s ease;
}
.carpeta-tile:hover { background: var(--paper); border-color: rgba(14, 159, 214, .5); }
.carpeta-tile .ico { width: 30px; height: 30px; color: var(--carpeta); }
.carpeta-tile.es-documento .ico { color: var(--sky-strong); stroke-width: 1.5; }
.carpeta-tile .texto { display: flex; flex-direction: column; min-width: 0; }
.carpeta-tile .nombre { font-weight: 700; font-size: 14px; line-height: 1.3; }
.carpeta-tile .meta { font-size: 12px; color: var(--ink-soft); }
.tabla-archivos .celda-nombre { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.tabla-archivos .celda-nombre a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.tabla-archivos .celda-nombre a:hover { color: var(--sky-strong); text-decoration: underline; }
.tabla-archivos td.acciones-fila a, .tabla-archivos td.acciones-fila .boton-icono { display: inline-flex; padding: 6px; border-radius: 6px; vertical-align: middle; }
.tabla-archivos td.acciones-fila a:hover { background: var(--line-soft); }

/* panel flotante de subidas */
.panel-subidas {
  position: fixed; right: 20px; bottom: 20px; z-index: 100; width: min(400px, calc(100vw - 32px));
  background: var(--paper-raise); border-radius: 10px; box-shadow: 0 20px 60px rgba(6, 13, 28, .35); overflow: hidden;
}
.panel-subidas .panel-cab { display: flex; align-items: center; justify-content: space-between; background: var(--navy-deep); color: var(--on-dark); padding: 10px 14px; }
.panel-subidas .panel-cab .boton-icono { color: var(--on-dark); font-size: 20px; line-height: 1; padding: 2px 8px; }
.panel-subidas .panel-cab .boton-icono:hover { background: rgba(255, 255, 255, .1); }
.panel-lista { list-style: none; margin: 0; padding: 4px 0; max-height: 300px; overflow-y: auto; }
.panel-lista li { display: grid; grid-template-columns: 1fr; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); }
.panel-lista .nombre { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-lista .estado { font-size: 12px; color: var(--ink-soft); background: none; padding: 0; border-radius: 0; font-weight: 500; }
.panel-lista .pista { height: 4px; border-radius: 4px; background: var(--line-soft); margin-top: 6px; overflow: hidden; }
.panel-lista .barra { display: block; height: 100%; width: 0; background: var(--sky); transition: width .2s linear; }
.panel-lista li.ok .barra { background: var(--ok); }
.panel-lista li.ok .estado { color: var(--ok); font-weight: 700; }
.panel-lista li.error .barra { background: var(--bad); width: 100%; }
.panel-lista li.error .estado { color: var(--bad); font-weight: 700; }

/* ---------- pie ---------- */
footer.pie { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12.5px; background: var(--paper); }
footer.pie .envoltura { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 18px; }

/* ---------- pantallas chicas ---------- */
@media (max-width: 980px) {
  .drive { grid-template-columns: minmax(0, 1fr); }
  .drive-arbol { position: static; max-height: 320px; }
  .editor-plano { grid-template-columns: 1fr; }
}
@media (max-width: 1320px) {
  header.sitio .marca .sub { display: none; }   /* con el nombre largo, el menú entra en una sola línea */
}
@media (max-width: 760px) {
  header.sitio .usuario { border-left: 0; padding-left: 0; }
  header.sitio .marca .sub { display: none; }
  .tarjeta, .drive-principal { padding: 18px; }
  .barra-filtros .filtros, .barra-filtros label { width: 100%; }
  .barra-filtros select, .barra-filtros input[type=search], .barra-filtros .buscar-obra input { width: 100%; max-width: none; min-width: 0; }
  .barra-filtros .resultado { margin-left: 0; width: 100%; justify-content: space-between; }
  .buscador-grande button { padding: 12px 16px; }
  .planos.lista .plano-card { flex-wrap: wrap; }
  .planos.lista .plano-acciones { padding-top: 0; }
  .lista-archivos li { flex-wrap: wrap; }
}
@media print {
  header.sitio, .barra-filtros, .drive-arbol, .acciones, .panel-subidas { display: none !important; }
}
