/* Solicitudes · Liquid Glass con los colores de LabAP y de la bandeja de subrogados (moodboard 24-nov-2026). */
:root {
  --azul: #006FBA;
  --azul-osc: #005A97;
  --verde: #009889;
  --verde-osc: #00796D;
  --fondo: #E9F0F7;
  --texto: #0E1E2E;
  --tenue: #33475B;
  --vidrio: rgba(255, 255, 255, 0.56);
  --vidrio-borde: rgba(255, 255, 255, 0.75);
  --sombra: 0 12px 32px rgba(16, 42, 67, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --ok: #0B7A43;      --ok-f: rgba(11, 122, 67, 0.13);
  --revisar: #8A5200; --revisar-f: rgba(214, 140, 0, 0.17);
  --mal: #B4231B;     --mal-f: rgba(209, 59, 46, 0.13);
  --corr: #5B3DB0;    --corr-f: rgba(108, 75, 194, 0.14);
  --radio: 24px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 15px/1.45 Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
kbd {
  font: 700 12px/1 Inter, sans-serif; color: var(--texto); background: #fff; border-radius: 7px;
  padding: 4px 8px; box-shadow: 0 2px 0 rgba(16, 42, 67, 0.18); margin-left: 6px;
}
.tenue { color: var(--tenue); }

/* Fondo con manchas de color, como LabAP */
.fondo { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.mancha { position: absolute; border-radius: 50%; filter: blur(90px); }
.mancha.azul { width: 620px; height: 620px; left: -160px; top: -160px; background: rgba(0, 111, 186, 0.36); }
.mancha.verde { width: 560px; height: 560px; right: -140px; bottom: -140px; background: rgba(0, 152, 137, 0.28); }

.vidrio {
  background: var(--vidrio);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--vidrio-borde);
  box-shadow: var(--sombra);
  border-radius: var(--radio);
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.85); font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primario { background: var(--azul); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(0, 111, 186, 0.30); }
.btn.primario:hover { background: var(--azul-osc); }
.btn.verde { background: var(--verde-osc); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(0, 121, 109, 0.28); }
.btn.verde:hover { background: #00665C; }
.btn.grande { height: 60px; font-size: 18px; font-weight: 800; padding: 0 26px; border-radius: 16px; }
.btn.icono { width: 46px; padding: 0; }
.btn.chico { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.peligro { color: var(--mal); }
.enlace { background: none; border: 0; color: var(--azul-osc); font-weight: 700; cursor: pointer; padding: 0; }
.enlace:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(0, 111, 186, 0.45); outline-offset: 2px; }

input[type=text], input:not([type]), input[type=search], input[type=password], input[type=date], select.selector, select.campo {
  height: 44px; border-radius: 12px; border: 1px solid rgba(16, 42, 67, 0.14); background: rgba(255, 255, 255, 0.9);
  padding: 0 12px; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 111, 186, 0.18); }

/* Marca */
.marca { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 28%, #fff, rgba(255, 255, 255, 0.7) 72%);
  border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 6px 14px rgba(16, 42, 67, 0.12), inset 0 2px 1px #fff;
  position: relative;
}
.logo::after {
  content: ""; position: absolute; inset: 9px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006FBA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E");
}
.marca-nombre { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; line-height: 1.1; }
.marca-sub { font-size: 12px; color: var(--tenue); }
.marca.grande .logo { width: 56px; height: 56px; }
.marca.grande .logo::after { inset: 13px; }
.marca.grande .marca-nombre { font-size: 26px; }

/* Entrar */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left)); }
.tarjeta-entrar { width: min(420px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.tarjeta-entrar label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.error { margin: 0; color: var(--mal); font-weight: 600; font-size: 14px; }

/* Barra superior */
.barra {
  position: sticky; top: 10px; z-index: 5; margin: 10px 16px 0; padding: 10px 14px 10px 12px;
  display: flex; align-items: center; gap: 18px; border-radius: 20px;
}
.pestanas { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.55); border-radius: 14px; padding: 4px; }
.pestana { border: 0; background: none; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 700; color: var(--tenue); cursor: pointer; }
.pestana.activa { background: #fff; color: var(--texto); box-shadow: 0 2px 8px rgba(16, 42, 67, 0.10); }
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.chip-hoy { font-size: 14px; color: var(--tenue); background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 7px 14px; }
.chip-hoy b { color: var(--texto); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--azul); color: #fff;
  font-weight: 800; font-size: 14px; cursor: pointer;
}

/* Mostrador */
.mostrador {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); gap: 18px;
  padding: 18px 16px 24px; align-items: start;
}
.col-camara, .col-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.col-camara { position: sticky; top: 92px; }
.tarjeta-camara { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.visor {
  position: relative; border-radius: 18px; overflow: hidden; background: #0E1E2E;
  aspect-ratio: 4 / 3; max-height: calc(100vh - 250px); display: grid; place-items: center;
}
.visor video, .visor img { width: 100%; height: 100%; object-fit: contain; display: block; }
.visor img { background: #1b2b3b; cursor: zoom-in; }
.visor-etiqueta {
  position: absolute; left: 14px; top: 14px; font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(14, 30, 46, 0.55); backdrop-filter: blur(10px); border-radius: 999px; padding: 6px 12px;
  display: flex; align-items: center; gap: 8px;
}
.visor-etiqueta .punto { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3); }
.visor-etiqueta.foto .punto { background: #93C5FD; box-shadow: none; }
.visor-aviso {
  position: absolute; inset: auto 16px 16px; color: #fff; background: rgba(14, 30, 46, 0.7);
  border-radius: 14px; padding: 12px 14px; font-weight: 600; text-align: center;
}
.miniaturas { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.miniaturas button {
  width: 64px; height: 64px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.7); padding: 0; overflow: hidden;
  background: #000; cursor: pointer;
}
.miniaturas button.activa { border-color: #fff; box-shadow: 0 0 0 3px var(--azul); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; }
.controles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.controles .btn.grande { flex: 1 1 260px; }
.selector { max-width: 220px; }
.destello { animation: destello .35s ease-out; }
@keyframes destello { from { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.8); } to { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0); } }

/* Panel derecho */
.panel { padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 2; }
.panel-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-cabeza h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.panel-cabeza p { margin: 4px 0 0; color: var(--tenue); font-size: 14px; }
.etiqueta { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--tenue); text-transform: uppercase; }
.pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pasos li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.6); }
.pasos .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--azul); background: #fff; flex: none; }
.pasos b { display: block; }
.pasos span.d { font-size: 13px; color: var(--tenue); }
.pasos li.hecho .num { background: var(--verde); color: #fff; }
.pasos li.ahora { background: #fff; box-shadow: 0 6px 16px rgba(16, 42, 67, 0.08); }

.progreso { display: flex; flex-direction: column; gap: 8px; }
.progreso .fila { display: flex; justify-content: space-between; font-weight: 600; color: var(--tenue); font-size: 14px; }
.barra-prog { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); border: 1px solid #fff; overflow: hidden; }
.barra-prog > div { height: 100%; border-radius: 999px; background: var(--azul); width: 0; transition: width .3s linear; }

.campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.campos label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--tenue); min-width: 0; }
.campos label input, .campos label select { font-size: 15px; font-weight: 600; color: var(--texto); width: 100%; }
.campos .ancho2 { grid-column: span 2; }
.campos .ancho3 { grid-column: 1 / -1; }

.estudios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.estudio {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 12px 12px 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.82); border: 1px solid #fff;
}
.estudio.revisar { background: #FFF8EA; border-color: rgba(214, 140, 0, 0.35); }
.estudio.no-esta { background: #FFF1EF; border-color: rgba(209, 59, 46, 0.30); grid-template-columns: minmax(0, 1fr) auto; }
.estudio .cod { font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--azul-osc); word-break: break-all; }
.estudio .nom { font-weight: 700; }
.estudio .dice { font-size: 13px; color: var(--tenue); grid-column: 2 / 3; }
.estudio.no-esta .dice { grid-column: 1 / 2; }
.estudio .acciones { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.estudio .der { display: flex; align-items: center; gap: 6px; }
.chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.chip.seguro { color: var(--ok); background: var(--ok-f); }
.chip.revisar { color: var(--revisar); background: var(--revisar-f); }
.chip.no-esta { color: var(--mal); background: var(--mal-f); }
.chip.corregido { color: var(--corr); background: var(--corr-f); }
.chip.lista { color: #fff; background: var(--verde-osc); }
.chip.tenue { color: var(--tenue); background: rgba(16, 42, 67, 0.08); }
.quitar { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(16, 42, 67, 0.06); cursor: pointer; font-size: 18px; line-height: 1; color: var(--tenue); }
.quitar:hover { background: var(--mal-f); color: var(--mal); }

.buscador { position: relative; }
.buscador input { width: 100%; }
.sugerencias {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 4; list-style: none; margin: 0; padding: 6px;
  background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 42, 67, 0.18); max-height: 320px; overflow: auto;
}
.sugerencias li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 10px; }
.sugerencias li:hover, .sugerencias li.sel { background: rgba(0, 111, 186, 0.08); }
.sugerencias .cod { font: 700 12px/1.3 ui-monospace, Menlo, monospace; color: var(--azul-osc); overflow-wrap: anywhere; }
.sugerencias .inc { grid-column: 2; font-size: 12px; color: var(--tenue); }

.notas { margin: 0; padding: 12px 14px 12px 30px; border-radius: 14px; background: rgba(0, 111, 186, 0.07); font-size: 13px; color: var(--tenue); }
.notas li + li { margin-top: 4px; }
.pie-precio { font-size: 13px; color: var(--tenue); margin: 0; }
.acciones-final { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acciones-final .btn.verde { flex: 1 1 220px; height: 54px; font-size: 17px; }
.mensaje { padding: 14px 16px; border-radius: 16px; font-weight: 600; }
.mensaje.ok { background: var(--ok-f); color: var(--ok); }
.mensaje.mal { background: var(--mal-f); color: var(--mal); }
.mensaje.aviso { background: var(--revisar-f); color: var(--revisar); }

/* Fotos de hoy */
.hoy { padding: 16px 18px; position: relative; z-index: 1; }
.hoy-cabeza { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hoy-cabeza h2 { font-size: 16px; font-weight: 800; }
.lista-hoy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lista-hoy li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 6px; border-top: 1px solid rgba(16, 42, 67, 0.07); cursor: pointer; border-radius: 10px; }
.lista-hoy li:first-child { border-top: 0; }
.lista-hoy li:hover { background: rgba(255, 255, 255, 0.6); }
.lista-hoy .hora { font: 700 13px ui-monospace, Menlo, monospace; color: var(--azul-osc); }
.lista-hoy .quien { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-hoy .cuantos { font-size: 12px; color: var(--tenue); }
.vacio { color: var(--tenue); font-size: 14px; padding: 8px 4px; }
.lista-hoy li.vacio { display: block; cursor: default; }
.lista-hoy li.vacio:hover { background: none; }

/* Evidencia */
.evidencia { padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.ev-barra { padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ev-barra input[type=search] { flex: 1 1 260px; }
.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.filtro { border: 0; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; color: var(--tenue); }
.filtro b { color: var(--texto); margin-left: 4px; }
.filtro.activo { background: var(--azul); color: #fff; }
.filtro.activo b { color: #fff; }
.medicion { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--tenue); }
.medicion span { background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 6px 12px; }
.medicion b { color: var(--texto); }
.ev-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.ev-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ev-tarjeta {
  border: 1px solid var(--vidrio-borde); background: var(--vidrio); border-radius: 20px; padding: 8px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}
.ev-tarjeta.sel { outline: 3px solid var(--azul); }
.ev-tarjeta .mini { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #dfe7ef; display: grid; place-items: center; color: var(--tenue); font-size: 12px; }
.ev-tarjeta .mini img { width: 100%; height: 100%; object-fit: cover; }
.ev-tarjeta .t1 { font-weight: 700; font-size: 14px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-tarjeta .t2 { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 0 4px 4px; font-size: 12px; color: var(--tenue); }
.ev-detalle { padding: 18px; position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; }
.ev-detalle .grande { border-radius: 16px; overflow: hidden; background: #1b2b3b; height: min(46vh, 440px); cursor: zoom-in; }
.ev-detalle .grande img { width: 100%; height: 100%; object-fit: contain; }
.datos { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.datos dt { color: var(--tenue); font-weight: 600; }
.datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Lupa y avisos */
.lupa { position: fixed; inset: 0; z-index: 20; background: rgba(14, 30, 46, 0.86); display: grid; place-items: center; padding: 24px; }
.lupa img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 12px; }
.lupa-cerrar { position: fixed; top: 18px; right: 18px; }
.aviso {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: var(--texto); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  max-width: calc(100vw - 32px);
}
.aviso.mal { background: var(--mal); }

@media (max-width: 1000px) {
  .mostrador, .ev-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .col-camara, .ev-detalle { position: static; }
  .barra { flex-wrap: wrap; }
  .campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .chip-hoy { display: none; }
  .campos { grid-template-columns: minmax(0, 1fr); }
  .campos .ancho2 { grid-column: auto; }
}
