/* Montaje de válvulas, tablero, verificación por cámara, PH y fotografías. */

/* ---------------- CVA Mecánico ---------------- */

.cva-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.cva-tab {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
  padding: 11px 20px; border-radius: 9px; font-size: 16px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; font-family: var(--font-body); display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cva-tab:hover { color: var(--text); border-color: var(--border-strong); }
.cva-tab.active { background: var(--teal); border-color: var(--teal); color: white; }
.cva-tab-badge {
  font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; border-radius: 999px;
  background: var(--pastilla); color: inherit;
}
.cva-tab.active .cva-tab-badge { background: rgba(0,0,0,0.22); }

.cva-planos { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); margin-bottom: 14px; overflow: hidden; }
.cva-planos-head {
  width: 100%; background: none; border: none; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; font-family: var(--font-body); font-size: 13px; font-weight: 600;
}
.cva-planos-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.cva-planos-head:hover { background: var(--bg-3); }
.cva-planos-chev { color: var(--text-faint); transition: transform 0.18s ease; }
.cva-planos-head[aria-expanded="false"] .cva-planos-chev { transform: rotate(-90deg); }
/* Un solo plano (el corte): se centra y se limita el ancho para que no se
   estire de lado a lado en pantallas anchas. */
.cva-planos-body { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 12px; padding: 4px 14px 14px; }
/* El atributo hidden lo anulaba la regla de arriba, así que el botón de plegar
   no hacía nada visible. Con esto vuelve a ocultarse. */
.cva-planos-body[hidden] { display: none; }
.cva-planos-body .cva-plano { max-width: 720px; width: 100%; }
.cva-plano { margin: 0; }
.cva-plano img {
  width: 100%; aspect-ratio: 900 / 620; object-fit: contain; display: block; background: #ffffff;
  border: 1px solid var(--border); border-radius: 8px; cursor: zoom-in;
  transition: border-color 0.15s ease;
}
.cva-plano img:hover { border-color: var(--teal); }
.cva-plano figcaption { font-size: 11px; color: var(--text-faint); margin-top: 6px; text-align: center; line-height: 1.35; }

/* Área de registro: fondo más claro que el resto para que resalten los
   cuadros donde se escriben las cantidades. */
.cva-wrap { background: var(--reg-bg); border-color: var(--border-strong); }
.cva-wrap .chk-table thead th { background: var(--reg-head); color: var(--reg-head-text); }
.cva-wrap .chk-table tbody td:first-child { background: var(--reg-col1); }
.cva-wrap .chk-table tbody tr:hover td { background: var(--hover-suave); }
.cva-wrap .chk-table tbody tr:hover td:first-child { background: var(--reg-col1-hover); }
.cva-wrap .chk-table th, .cva-wrap .chk-table td { border-bottom-color: var(--border); }

/* Celdas de cantidad (accesorios de válvula de aire) */
.qty-input {
  width: 48px; padding: 6px 4px; text-align: center; border-radius: 7px;
  border: 1.5px solid var(--campo-borde); background: var(--campo-bg); color: var(--text);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input::placeholder { color: #6b7280; font-weight: 400; }
.qty-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.qty-input.partial { background: rgba(47,191,113,0.2); border-color: rgba(47,191,113,0.6); color: #93f2c1; }
.qty-input.full { background: var(--ok); border-color: var(--ok); color: #06261a; }
.qty-input.missing { opacity: 0.4; border-style: dashed; }
.qty-input:disabled { cursor: default; }

/* "/n" = total que exige el cuadro de accesorios para esa cámara. */
.qty-wrap { display: inline-flex; align-items: baseline; gap: 3px; }
/* Fecha de registro debajo de la cantidad. Discreta mientras está vacía para
   que la vista siga siendo legible con 39 estructuras en pantalla. */
.qty-fecha {
  display: block; margin: 5px auto 0; width: 106px; padding: 2px 4px;
  background: var(--bg-1); border: 1px solid var(--border-soft); border-radius: 5px;
  color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; text-align: center;
  color-scheme: var(--esquema);
}
.qty-fecha.puesta { color: var(--text-dim); border-color: var(--border); }
/* Sin cantidad registrada la fecha se dibuja igual pero casi transparente: así
   todas las filas miden lo mismo y la tabla no salta de alto de una a otra. */
.qty-fecha.vacia { opacity: 0.18; border-color: transparent; }
.qty-fecha.vacia:hover, .qty-fecha.vacia:focus { opacity: 1; border-color: var(--border-soft); }
.qty-fecha:focus { outline: none; border-color: var(--teal); color: var(--text); }
.qty-fecha:disabled { opacity: 0.35; }
.qty-fecha.vacia:disabled { opacity: 0.12; }
.qty-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); font-weight: 600; }
.stat-sub { font-family: var(--font-mono); font-size: 0.62em; color: var(--text-dim); font-weight: 500; }


/* Consulta por abscisa (dashboard) */
.absq-aviso { font-size: 12.5px; color: var(--amber); margin: 4px 0 10px; }
.absq-ficha { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: var(--bg-2); }
.absq-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 18px; margin-bottom: 12px; }
.absq-cod { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); display: flex; align-items: baseline; gap: 10px; }
.absq-dist { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-faint); }
.absq-tipo { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.absq-datos { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.absq-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 16px 22px; }
.absq-lista.dos { display: block; column-count: 2; column-gap: 18px; }
.absq-lista.dos li { break-inside: avoid; }
.absq-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.absq-col-est { margin: 7px 0 8px; }
.absq-est { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); }
.absq-est.ok { color: var(--ok); border-color: var(--ok); }
.absq-est.proc { color: var(--teal); border-color: var(--teal-dim); }
.absq-est.sin { color: var(--text-faint); }
.absq-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.absq-lista li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-faint); padding: 2px 0; }
.absq-lista li.ok { color: var(--text); }
.absq-lista li.ok svg { color: var(--ok); }
.absq-det { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 720px) {
  .absq-cols { grid-template-columns: 1fr; }
  .absq-lista.dos { column-count: 1; }
}

/* Resumen general del proyecto (anillo + desglose) */
.resumen-grid { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; }
.resumen-chart { position: relative; height: 220px; }
.resumen-centro {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.resumen-centro-num { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--text); line-height: 1; }
.resumen-centro-lbl { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

.resumen-leyenda { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.rl-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.rl-item strong { color: var(--text); font-family: var(--font-mono); font-size: 15px; }
.rl-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.resumen-rubricas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.rr-fila {
  cursor: pointer; border-radius: 8px; padding: 7px 9px; margin: -7px -9px;
  border: 1px solid transparent; transition: background 0.15s ease, border-color 0.15s ease;
}
.rr-fila:hover, .rr-fila:focus-visible { background: var(--bg-2); border-color: var(--border); outline: none; }
.rr-fila:hover .rr-nombre { color: var(--teal); }
.rr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.rr-nombre { font-size: 12.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.rr-pct { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--teal); }
.rr-meta { font-size: 11px; color: var(--text-faint); margin-top: 5px; }

/* Resumen de avance del montaje */
.cva-kpis { margin: 4px 0 6px; }
.kpi-hero {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.kpi-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.kpi-hero-val { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--text); margin-top: 3px; }
.kpi-hero-pct { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--teal); line-height: 1; }
.kpi-hero-meta { font-size: 12px; color: var(--text-dim); margin-top: 9px; }
.progress-bar.lg { height: 11px; }

/* Nombre corto del accesorio bajo su literal en el encabezado. */

/* Fila de totales al final de la tabla. No se fija al pie a propósito: al
   combinar sticky-bottom con la columna congelada de la izquierda, Chrome
   pintaba la primera celda por debajo y el rótulo quedaba tapado. */
/* El pie se queda fijo abajo mientras se recorren las estructuras, igual que
   la cabecera de accesorios arriba y la columna de estructuras a la izquierda. */
.cva-total-row td {
  position: sticky; bottom: 0; z-index: 2;
  background: var(--reg-total); font-family: var(--font-mono); font-weight: 700; font-size: 12.5px;
  text-align: center; color: var(--text); border-top: 2px solid var(--border-strong);
}
/* Sin sticky y con display de celda: .chk-table pone la primera columna en flex,
   y un td en flex no se estira al alto de la fila; de ahí el hueco oscuro que
   quedaba bajo el rótulo. El cuerpo ya lo corregía, el pie no. */
.cva-total-row td:first-child {
  display: table-cell; vertical-align: middle; left: 0; z-index: 3;
  text-align: left; background: var(--reg-total);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600; color: var(--text-dim);
}
.cva-ficha-acc { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.cva-ficha-acc strong { font-family: var(--font-mono); font-size: 12.5px; }
.cva-ficha-acc em { font-style: normal; font-size: 10.5px; color: var(--text-faint); line-height: 1.3; }

.cva-lightbox-inner { position: relative; background: #ffffff; border-radius: 12px; padding: 14px; max-width: min(94vw, 900px); }
.cva-lightbox-inner img { width: 100%; height: auto; display: block; }
.cva-lightbox-inner p { margin: 8px 0 0; font-size: 12px; color: #55606c; text-align: center; }
.cva-lightbox-inner .cva-ficha-close { position: absolute; top: 8px; right: 8px; color: #55606c; background: rgba(255,255,255,0.9); }
.cva-lightbox-inner .cva-ficha-close:hover { background: #e7ebf0; color: #1a2330; }

.cva-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 12px; }
.cva-filters input[type="text"], .cva-filters select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: 13px; font-family: var(--font-body);
}
.cva-filters input[type="text"] { flex: 1; min-width: 200px; }

.cva-table thead th { text-align: center; }
.cva-table thead th:first-child { text-align: center; min-width: 100px; }

/* Escala de la tabla de montaje: ancho fijo por columna para que el encabezado,
   los registros y la fila de totales queden alineados. La primera columna y la
   de avance son más anchas porque llevan texto; las de accesorio, todas iguales. */
.cva-table { table-layout: fixed; width: 100%; }
.cva-table th, .cva-table td { padding: 5px 8px; }
.cva-table thead th { vertical-align: middle; width: 118px; }
/* Columna del nombre: solo lleva "CVA 01" y su abscisa, así que se deja
   estrecha y centrada. El resto de columnas reparte el ancho sobrante. */
.cva-table thead th:first-child { width: 100px; min-width: 100px; }
.cva-table thead th.th-tramo { width: 96px; }
.cva-table thead th:last-child { width: 128px; }

/* Desplegable del botón de reportes: parte diario o acumulado. */
.rep-menu { position: relative; display: inline-flex; }
.rep-opts {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30;
  display: flex; flex-direction: column; min-width: 168px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35); overflow: hidden;
}
.rep-opts button {
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 9px 13px; text-align: left; font-family: var(--font-body); font-size: 12.5px;
}
.rep-opts button:hover { background: var(--bg-3); color: var(--teal); }
/* Sin esto el display de arriba pisa al atributo hidden y el menú se ve siempre. */
.rep-opts[hidden] { display: none; }

/* Cabecera del montaje: una sola línea con la cifra, la barra y el porcentaje.
   Antes era un bloque alto con el número en grande. */
.mont-total {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-2); margin-bottom: 10px;
}
.mt-tit { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.mt-cifra { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--text); }
.mt-cifra i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.mt-barra-tot { flex: 1; min-width: 120px; height: 6px; }
.mt-tot-pct { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--teal); }
.mt-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* Tarjetas de tramo: cámaras terminadas, las que faltan y las piezas. */
.mont-tramos { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px; }
.mt-card {
  --t: var(--teal);
  padding: 8px 11px; border: 1px solid color-mix(in srgb, var(--t) 45%, transparent);
  border-left: 5px solid var(--t);
  border-radius: 8px;
  background: color-mix(in srgb, var(--t) 12%, var(--bg-2));
}
.mt-card .mt-head b { color: color-mix(in srgb, var(--t) 55%, var(--text)); }
.mt-card .mt-pct { color: var(--t); }
.mt-card .mt-barra { background: color-mix(in srgb, var(--t) 22%, var(--bg-3)); }
.mt-card .mt-barra .progress-bar-fill { background: var(--t); }
.mt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mt-head b { font-size: 12px; font-weight: 700; color: var(--text); }
.mt-pct { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--teal); }
.mt-linea { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.mt-ok { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--text); }
.mt-falta { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: #e0a458; }
.mt-card .mt-barra { display: block; height: 5px; margin: 6px 0 4px; }
/* Un color por tramo. Se define una sola vez y de ahí salen el borde, el
   fondo, el título, el porcentaje y la barra de la tarjeta. */
.mt-card.t10, .mt-card.t1 { --t: #5b9bd5; }
.mt-card.t8 { --t: #d69e4a; }
.mt-card.t9 { --t: #c9768f; }
.mt-card.t7 { --t: #4fb88a; }
.mt-card.tph { --t: #9684d2; }
.mt-card.tx { --t: #8d949e; }

/* Tinte por tramo: se usa un inset en vez de background para no pisar el fondo
   propio de cada celda (la primera columna y el hover tienen el suyo). */
.cva-table tbody tr.tramo-10 td, .cva-table tbody tr.tramo-1 td { box-shadow: inset 0 0 0 999px rgba(91,155,213,0.17); }
.cva-table tbody tr.tramo-8 td { box-shadow: inset 0 0 0 999px rgba(214,158,74,0.17); }
.cva-table tbody tr.tramo-9 td { box-shadow: inset 0 0 0 999px rgba(201,118,143,0.17); }
.cva-table tbody tr.tramo-7 td { box-shadow: inset 0 0 0 999px rgba(79,184,138,0.16); }
.cva-table tbody tr.tramo-ph td { box-shadow: inset 0 0 0 999px rgba(150,132,210,0.17); }
/* La primera columna del grupo lleva el color un punto más marcado, para que
   la franja se lea de un vistazo al recorrer la tabla. */
.cva-table tbody tr[class*="tramo-"] td:first-child { border-left: 4px solid transparent; }
.cva-table tbody tr.tramo-10 td:first-child, .cva-table tbody tr.tramo-1 td:first-child { border-left-color: #5b9bd5; }
.cva-table tbody tr.tramo-8 td:first-child { border-left-color: #d69e4a; }
.cva-table tbody tr.tramo-9 td:first-child { border-left-color: #c9768f; }
.cva-table tbody tr.tramo-7 td:first-child { border-left-color: #4fb88a; }
.cva-table tbody tr.tramo-ph td:first-child { border-left-color: #9684d2; }
.tramo-select.t10, .tramo-select.t1 { border-color: #5b9bd5; color: #d9e8f7; background: rgba(91,155,213,0.22); }
.tramo-select.t8 { border-color: #d69e4a; color: #f7e9d2; background: rgba(214,158,74,0.22); }
.tramo-select.t9 { border-color: #c9768f; color: #f6dde5; background: rgba(201,118,143,0.22); }
.tramo-select.t7 { border-color: #4fb88a; color: #d7f3e6; background: rgba(79,184,138,0.22); }
.tramo-select.tph { border-color: #9684d2; color: #e4dff7; background: rgba(150,132,210,0.22); }

/* Tramo del trazado al que pertenece la cámara. */
.tramo-select {
  width: 84px; padding: 4px 3px; border-radius: 6px; text-align: center;
  border: 1px solid var(--border-soft); background: var(--bg-1); color: var(--text-faint);
  font-family: var(--font-body); font-size: 11px; font-weight: 600; cursor: pointer;
  /* Sin esto el desplegable nativo se abre en claro y hereda el color del
     texto del selector: los números salían casi invisibles sobre blanco. */
  color-scheme: var(--esquema);
}
/* La lista desplegable la dibuja el sistema: hay que darle su propio color,
   no puede heredar el del tramo. */
.tramo-select option {
  background: var(--opcion-bg);
  color: var(--opcion-text);
  font-weight: 600;
}
.tramo-select.puesto { color: var(--text); border-color: var(--border); }
.tramo-select:focus { outline: none; border-color: var(--teal); color: var(--text); }
.tramo-select:disabled { cursor: default; opacity: 0.5; }

.ta-herramientas { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; }
.ta-filtro {
  flex: 1; min-width: 0; max-width: 84px; padding: 2px 4px; border-radius: 5px;
  border: 1px solid var(--border-soft); background: var(--bg-1); color: var(--text-dim);
  font-family: var(--font-body); font-size: 9.5px; font-weight: 600;
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.ta-filtro:focus { outline: none; border-color: var(--teal); color: var(--text); }
.ta-pdf {
  background: none; border: 1px solid var(--border-soft); border-radius: 5px;
  color: var(--text-faint); cursor: pointer; padding: 2px 4px; display: inline-flex; flex-shrink: 0;
}
.ta-pdf:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-dim); }
/* Columna con filtro activo: se distingue de un vistazo. */
.cva-table thead th.ta-filtrada { background: var(--teal-dim); }
.cva-table thead th.ta-filtrada .ta-filtro { color: var(--teal); border-color: var(--teal); }

/* Fila de totales: cifra, barra y porcentaje del accesorio, bajo su columna. */
.cva-total-row .tot-num { display: block; font-size: 12.5px; }
.cva-total-row .tot-bar { display: block; height: 5px; margin: 3px auto 2px; max-width: 78px; }
.cva-total-row .tot-bar .progress-bar-fill { display: block; height: 100%; }
.cva-total-row .tot-pct { display: block; font-size: 10.5px; color: var(--text-dim); }

/* La celda de cantidad ocupa el ancho de su columna, sin desbordarla. Aquí se
   aprieta más que en el resto de checklists porque son 39 filas por 5 columnas
   y con la fecha debajo la tabla se iba de alto. */
.cva-table .qty-input { width: 46px; padding: 3px 4px; font-size: 12.5px; }
.cva-table .qty-fecha { width: 92px; margin-top: 3px; padding: 1px 3px; font-size: 10px; }
.cva-table tbody td:first-child { display: table-cell; }
.cva-name {
  background: none; border: none; padding: 0; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; font-family: var(--font-mono);
  color: var(--text); transition: color 0.15s ease;
}
.cva-name:hover { color: var(--teal); }
.cva-name:hover .cva-name-id { text-decoration: underline; }
.cva-name-id { font-size: 12.5px; font-weight: 700; }
.cva-name-meta { font-size: 10.5px; color: var(--text-faint); }
/* Estado de cada estructura en la prueba hidrostática. El ejecutado se marca
   en verde para que se lea de un vistazo cuál tramo ya pasó la prueba. */
.ph-estado-sel {
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-dim);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
}
.ph-estado-sel.sin-estado { color: var(--text-faint); border-style: dashed; }
.ph-estado-sel.ejecutado { color: var(--ok); border-color: var(--ok); background: var(--ok-dim); }
.ph-meta { max-width: 62px; }

/* Fotografía por registro en las rúbricas que la llevan (esterillas). */
.foto-cell { white-space: nowrap; }
.foto-mini { display: inline-block; vertical-align: middle; }
.foto-mini img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--border); display: block;
}
.foto-vacia { color: var(--text-faint); font-family: var(--font-mono); }
.foto-acciones { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
/* Las celdas de PH llevan dos líneas (cantidad y fecha); sin esto el nombre de
   la estructura queda pegado arriba y la fila se ve desalineada. */
.ph-table tbody td { vertical-align: middle; }
.cva-pct-cell { min-width: 96px; }
.cva-pct-cell .progress-bar { margin-top: 0; }
.cva-pct { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); display: block; margin-top: 4px; text-align: center; }

.cva-ficha { max-width: 480px; }
.cva-ficha-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cva-ficha-head h3 { margin: 2px 0 0; font-family: var(--font-head); font-size: 20px; }
.cva-ficha-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); }
.cva-ficha-close { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 3px; display: inline-flex; border-radius: 6px; }
.cva-ficha-close:hover { color: var(--text); background: var(--bg-3); }
.cva-ficha-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 14px; }
.cva-ficha-grid dt, .cva-ficha-ref dt { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); font-family: var(--font-mono); margin-bottom: 3px; }
.cva-ficha-grid dd, .cva-ficha-ref dd { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
.cva-ficha-ref { margin-bottom: 16px; }
.cva-ficha-ref dd { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--text-dim); }
.cva-ficha-prog { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cva-ficha-prog .progress-bar { flex: 1; margin-top: 0; }
.cva-ficha-prog span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.cva-ficha-list { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 2px; }
.cva-ficha-list li {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; color: var(--text-dim); background: var(--bg-2);
}
.cva-ficha-list li.ok { color: var(--text); }
.cva-ficha-mark {
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: transparent;
}
.cva-ficha-list li.ok .cva-ficha-mark { background: var(--teal); border-color: var(--teal); color: white; }
.cva-ficha-medida { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }


.nav-link .nav-icon svg { display: block; margin: 0 auto; }
.rubric-icon { color: var(--teal); }
.card-header h2 svg { color: var(--teal); }
.group-title svg { color: var(--teal); }
.activity-icon { color: var(--text-dim); }
.btn svg { flex-shrink: 0; }

.hidden { display: none !important; }

.inline-form { border-top: 1px solid var(--border-soft); padding-top: 16px; margin-bottom: 18px; animation: viewIn 0.22s ease; }
.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; margin-bottom: 14px; }
.inline-fields .field { margin-bottom: 0; }
.inline-fields .field label { color: var(--text-faint); font-weight: 500; }
.inline-fields .field input:disabled { color: var(--text-dim); background: var(--bg-1); }
.inline-actions { display: flex; gap: 10px; }

.user-menu {
  position: fixed; width: 250px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px; z-index: 90; box-shadow: var(--shadow);
  animation: modalIn 0.15s ease;
}
.um-head { display: flex; gap: 11px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.um-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: white; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.um-email { font-size: 12.5px; word-break: break-all; }
.um-role { font-size: 10.5px; color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }
.um-nombre { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 1px; }
.um-alcance { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; line-height: 1.35; }
.um-item { display: flex; gap: 9px; align-items: center; width: 100%; background: transparent; border: none; color: var(--red); padding: 10px 11px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-family: var(--font-body); transition: background 0.15s ease; }
.um-item:hover { background: rgba(229, 86, 109, 0.12); }
