@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --navy: #073a59;
  --blue: #087fa4;
  --teal: #078276;
  --ink: #213649;
  --muted: #61798a;
  --line: #d8e5eb;
  --soft: #f2f8fa;
  --white: #fff;
  --warning: #9a6500;
  --warning-bg: #fff7db;
  --danger: #a73535;
  --danger-bg: #fff0f0;
  --shadow: 0 18px 55px rgba(19,65,87,.11);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { background: #eaf4f7; }
body {
  margin: 0;
  background: linear-gradient(135deg, #eff8fb 0%, #f8fbfc 52%, #e5f2f2 100%);
  min-height: 100vh;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.header {
  height: 154px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 24px; }
.brand img { 
  width: 136px; 
  height: 136px; 
  object-fit: contain; 
  filter: drop-shadow(0 4px 14px rgba(19, 65, 87, 0.12)); 
}
.brand strong { display: block; font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.22; }
.brand span { display: block; color: var(--muted); font-size: 16px; margin-top: 6px; }
.status {
  display: flex; gap: 8px; align-items: center; padding: 10px 16px;
  border-radius: 999px; background: #e6fbf5; color: #086f63;
  font-weight: 750; font-size: 14px;
}
.status i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #12b886; box-shadow: 0 0 0 4px #c9f5e8;
}

.app {
  max-width: 1480px; margin: auto; padding: 24px;
  display: grid; grid-template-columns: 390px 1fr; gap: 22px;
  min-height: calc(100vh - 154px);
}
.sidebar {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 202px);
  position: sticky;
  top: 178px;
}
.content {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.eyebrow { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sidebar h1 { color: var(--navy); font-size: 25px; line-height: 1.15; margin: 5px 0 7px; }
.sidebar .intro { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }

.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 15px; color: #688292; }
.search input {
  width: 100%; height: 48px; padding: 0 42px;
  border: 1px solid #bcd3de; border-radius: 14px;
  background: #fbfdfe; color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #dff5fb; }
.search button {
  position: absolute; right: 7px; top: 7px; width: 34px; height: 34px;
  border: 0; background: transparent; color: #6a8291; font-size: 18px;
}

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.filters select {
  min-width: 0; width: 100%; height: 42px; border: 1px solid var(--line);
  border-radius: 11px; background: white; padding: 0 9px;
  color: #385369; font-size: 13px;
}
.count { font-size: 12px; color: var(--muted); margin: 2px 2px 9px; }

.exam-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 8px 12px 20px 8px;
  margin: 0 -12px 0 -8px;
  min-height: 150px;
  flex: 1;
  scrollbar-color: #9dc1ce transparent;
  scrollbar-width: thin;
}
.exam-list::-webkit-scrollbar { width: 6px; }
.exam-list::-webkit-scrollbar-thumb { background: #9dc1ce; border-radius: 20px; }

.exam-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(19, 65, 87, 0.05);
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(19,65,87,.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease;
  height: 90px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.exam-item:hover {
  transform: translateY(-3px);
  z-index: 5;
  box-shadow: 0 12px 24px -4px rgba(19, 65, 87, 0.12), 0 4px 10px rgba(19, 65, 87, 0.04);
  background: linear-gradient(135deg, #ffffff 0%, #f4fafc 100%);
  border-color: rgba(19, 65, 87, 0.1);
}
.exam-item.active {
  background: #edf9fc;
  box-shadow: inset 4px 0 var(--blue), 0 4px 12px rgba(19,65,87,.08);
  border-color: rgba(3, 55, 86, 0.15);
}

/* Iluminación difusa, suave y elegante (Sin cortes) */
.exam-item.tube-lila:hover, .exam-item:has(.lab-tube.lila):hover {
  background: linear-gradient(135deg, #ffffff 0%, #faf4fc 60%, #f6eaf9 100%);
  box-shadow: 0 14px 28px -4px rgba(155, 98, 181, 0.2), 0 4px 12px rgba(155, 98, 181, 0.08);
  border-color: rgba(155, 98, 181, 0.3);
}
.exam-item.tube-lila.active, .exam-item.active:has(.lab-tube.lila) {
  background: #f8effb;
  box-shadow: inset 4px 0 #9b62b5, 0 4px 12px rgba(155, 98, 181, 0.12);
  border-color: rgba(155, 98, 181, 0.25);
}

.exam-item.tube-amarilla:hover, .exam-item:has(.lab-tube.amarilla):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fffdf2 60%, #fdf8db 100%);
  box-shadow: 0 14px 28px -4px rgba(230, 185, 40, 0.22), 0 4px 12px rgba(230, 185, 40, 0.1);
  border-color: rgba(230, 185, 40, 0.35);
}
.exam-item.tube-amarilla.active, .exam-item.active:has(.lab-tube.amarilla) {
  background: #fdfcee;
  box-shadow: inset 4px 0 #e6b928, 0 4px 12px rgba(230, 185, 40, 0.12);
  border-color: rgba(230, 185, 40, 0.3);
}

.exam-item.tube-celeste:hover, .exam-item:has(.lab-tube.celeste):hover {
  background: linear-gradient(135deg, #ffffff 0%, #f2f9fd 60%, #e2f2fa 100%);
  box-shadow: 0 14px 28px -4px rgba(100, 185, 223, 0.24), 0 4px 12px rgba(100, 185, 223, 0.1);
  border-color: rgba(100, 185, 223, 0.35);
}
.exam-item.tube-celeste.active, .exam-item.active:has(.lab-tube.celeste) {
  background: #edf7fc;
  box-shadow: inset 4px 0 #64b9df, 0 4px 12px rgba(100, 185, 223, 0.12);
  border-color: rgba(100, 185, 223, 0.3);
}

.exam-item.tube-verde:hover, .exam-item:has(.lab-tube.verde):hover {
  background: linear-gradient(135deg, #ffffff 0%, #f2faf5 60%, #e2f5e9 100%);
  box-shadow: 0 14px 28px -4px rgba(73, 163, 111, 0.22), 0 4px 12px rgba(73, 163, 111, 0.1);
  border-color: rgba(73, 163, 111, 0.3);
}
.exam-item.tube-verde.active, .exam-item.active:has(.lab-tube.verde) {
  background: #eef9f2;
  box-shadow: inset 4px 0 #49a36f, 0 4px 12px rgba(73, 163, 111, 0.12);
  border-color: rgba(73, 163, 111, 0.25);
}

.exam-item.tube-gris:hover, .exam-item:has(.lab-tube.gris):hover {
  background: linear-gradient(135deg, #ffffff 0%, #f6f8f9 60%, #edf1f3 100%);
  box-shadow: 0 14px 28px -4px rgba(130, 141, 150, 0.22), 0 4px 12px rgba(130, 141, 150, 0.1);
  border-color: rgba(130, 141, 150, 0.3);
}
.exam-item.tube-gris.active, .exam-item.active:has(.lab-tube.gris) {
  background: #f1f4f6;
  box-shadow: inset 4px 0 #828d96, 0 4px 12px rgba(130, 141, 150, 0.12);
  border-color: rgba(130, 141, 150, 0.25);
}

.exam-item.tube-roja:hover, .exam-item:has(.lab-tube.roja):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fdf4f4 60%, #fce6e6 100%);
  box-shadow: 0 14px 28px -4px rgba(215, 71, 71, 0.22), 0 4px 12px rgba(215, 71, 71, 0.1);
  border-color: rgba(215, 71, 71, 0.3);
}
.exam-item.tube-roja.active, .exam-item.active:has(.lab-tube.roja) {
  background: #fdf1f1;
  box-shadow: inset 4px 0 #d74747, 0 4px 12px rgba(215, 71, 71, 0.12);
  border-color: rgba(215, 71, 71, 0.25);
}

/* Iluminación elegante para frascos de orina (Tapa Roja / Muestra Ámbar) */
.exam-item.tube-orina:hover, .exam-item:has(.urine-cup):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fffdf4 60%, #fef8db 100%);
  box-shadow: 0 14px 28px -4px rgba(217, 119, 6, 0.18), 0 4px 12px rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.3);
}
.exam-item.tube-orina.active, .exam-item.active:has(.urine-cup) {
  background: #fdfcee;
  box-shadow: inset 4px 0 #d97706, 0 4px 12px rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.25);
}

/* Iluminación elegante para tórulas Stuart (Tapa Azul Royal) */
.exam-item.tube-stuart:hover, .exam-item:has(.swab-tube):hover {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 60%, #e0effe 100%);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.18), 0 4px 12px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}
.exam-item.tube-stuart.active, .exam-item.active:has(.swab-tube) {
  background: #eff6ff;
  box-shadow: inset 4px 0 #2563eb, 0 4px 12px rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}

/* Iluminación elegante para Parasitológico Seriado (3 Frascos con Tapa Roja) */
.exam-item.tube-psd:hover, .exam-item:has(.stool-trio):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fdf5f5 60%, #fde8e8 100%);
  box-shadow: 0 14px 28px -4px rgba(220, 38, 38, 0.18), 0 4px 12px rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.28);
}
.exam-item.tube-psd.active, .exam-item.active:has(.stool-trio) {
  background: #fdf2f2;
  box-shadow: inset 4px 0 #dc2626, 0 4px 12px rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.25);
}

/* Iluminación elegante para Test de Graham / Enterobius (3 Frascos con Gasa y Tapa Roja) */
.exam-item.tube-graham:hover, .exam-item:has(.graham-trio):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fdf5f5 60%, #fde8e8 100%);
  box-shadow: 0 14px 28px -4px rgba(220, 38, 38, 0.18), 0 4px 12px rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.28);
}
.exam-item.tube-graham.active, .exam-item.active:has(.graham-trio) {
  background: #fdf2f2;
  box-shadow: inset 4px 0 #dc2626, 0 4px 12px rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.25);
}

/* Iluminación elegante para Bidón Orina 24 hrs (Naranjo Clínico / Tapa Blanca) */
.exam-item.tube-orina24:hover, .exam-item:has(.urine-jug):hover {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 60%, #ffedd5 100%);
  box-shadow: 0 14px 28px -4px rgba(234, 88, 12, 0.2), 0 4px 12px rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.32);
}
.exam-item.tube-orina24.active, .exam-item.active:has(.urine-jug) {
  background: #fff4e5;
  box-shadow: inset 4px 0 #ea580c, 0 4px 12px rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.28);
}

.exam-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--navy); font-size: 14px; line-height: 1.28; }
.exam-item small { display: flex; justify-content: flex-start; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.price-mini { color: #08756b; font-weight: 800; white-space: nowrap; }

/* ==========================================================================
   COMPONENTE: .urine-jug (Bidón Naranjo de Orina 24 Horas con Tapa Blanca)
   ========================================================================== */
.urine-jug {
  position: relative;
  display: block;
  width: 24px;
  height: 38px;
  margin: 0 4px 0 10px;
  align-self: center;
  flex-shrink: 0;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-item:hover .urine-jug {
  transform: translateY(-2px) rotate(3deg);
}

/* Tapa Blanca de Rosca con Bisel (Centrada Milimétricamente) */
.urine-jug:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 14px;
  height: 7px;
  border: 1px solid rgba(19, 65, 87, 0.28);
  border-radius: 2.5px 2.5px 1px 1px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%);
  box-shadow: 
    inset 0 1.5px 2px #ffffff, 
    inset 0 -1px 2px rgba(0, 0, 0, 0.15), 
    0 2px 4px rgba(19, 65, 87, 0.12);
}

/* Cuerpo del Bidón Naranjo HDPE con Asa Superior y Medidor de Litros */
.urine-jug:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 6px;
  bottom: 0;
  width: 22px;
  border-radius: 4px 4px 5px 5px;
  border: 1px solid rgba(194, 65, 12, 0.45);
  
  background: 
    /* 1. Asa lateral del bidón (ranura de agarre) */
    radial-gradient(ellipse 2.5px 6px at 17px 7px, rgba(255, 255, 255, 0.75) 55%, rgba(194, 65, 12, 0.5) 85%, transparent 100%),
    /* 2. Marcas de aforo y graduación de volumen (24h) */
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(255, 255, 255, 0.4) 5px 6px, transparent 6px 10px),
    /* 3. Plástico Naranjo Clínico de alta resistencia */
    linear-gradient(90deg, 
      #c2410c 0%, 
      #ea580c 20%, 
      #f97316 50%, 
      #fb923c 80%, 
      #ea580c 100%
    );
  
  box-shadow: 
    inset -2px 0 4px rgba(255, 255, 255, 0.4), 
    inset 2px 0 4px rgba(0, 0, 0, 0.2), 
    0 3px 6px rgba(19, 65, 87, 0.12);
}

/* ==========================================================================
   COMPONENTE: .graham-trio / .graham-jar (Kit 3 Frascos con Gasa al Fondo)
   ========================================================================== */
.graham-trio {
  display: flex;
  align-items: center;
  gap: 2.5px;
  align-self: center;
  margin: 0 2px 0 6px;
  flex-shrink: 0;
}

.graham-jar {
  position: relative;
  display: block;
  width: 14px;
  height: 36px;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-item:hover .graham-trio .graham-jar:nth-child(1) {
  transform: translateY(-2px) rotate(-4deg);
}
.exam-item:hover .graham-trio .graham-jar:nth-child(2) {
  transform: translateY(-3.5px);
}
.exam-item:hover .graham-trio .graham-jar:nth-child(3) {
  transform: translateY(-2px) rotate(4deg);
}

/* Tapa Roja con Rosca y Bisel (Centrada Milimétricamente) */
.graham-jar:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 15px;
  height: 6.5px;
  border: 1px solid rgba(19, 65, 87, 0.25);
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.55), 
    inset 0 -1px 2px rgba(0, 0, 0, 0.35), 
    0 1.5px 3px rgba(19, 65, 87, 0.12);
}

/* Frasco Cónico Delgado + Trozo de Gasa al Fondo + Fijador Transparente (Sin Paleta) */
.graham-jar:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  top: 6px;
  bottom: 0;
  clip-path: polygon(14% 100%, 86% 100%, 100% 0, 0 0);
  
  background: 
    /* 1. Trozo de gasa al fondo: trama cuadriculada textil blanca */
    repeating-linear-gradient(45deg, transparent 0 1.5px, rgba(255, 255, 255, 0.95) 1.5px 2.5px, transparent 2.5px 3.5px),
    repeating-linear-gradient(-45deg, transparent 0 1.5px, rgba(226, 232, 240, 0.95) 1.5px 2.5px, transparent 2.5px 3.5px),
    radial-gradient(ellipse 5px 3.5px at 50% 25px, #ffffff 85%, rgba(255,255,255,0) 100%),
    /* 2. Líquido Fijador Transparente / Cristalino con menisco */
    linear-gradient(180deg, 
      transparent 0% 35%, 
      rgba(255, 255, 255, 0.8) 35% 37%, 
      rgba(224, 242, 254, 0.4) 37% 65%, 
      rgba(186, 230, 253, 0.6) 100%
    ),
    /* 3. Plástico transparente con refracción */
    linear-gradient(90deg, 
      rgba(255, 255, 255, 0.5) 0%, 
      rgba(240, 248, 255, 0.1) 20%, 
      rgba(255, 255, 255, 0.25) 50%, 
      rgba(255, 255, 255, 0.7) 80%, 
      rgba(200, 230, 245, 0.25) 100%
    );
  
  filter: drop-shadow(0 1.5px 2.5px rgba(19, 65, 87, 0.1));
}

/* ==========================================================================
   COMPONENTE: .stool-trio / .psd-jar (Kit 3 Frascos Delgados con Paleta y Fijador)
   ========================================================================== */
.stool-trio {
  display: flex;
  align-items: center;
  gap: 2.5px;
  align-self: center;
  margin: 0 2px 0 6px;
  flex-shrink: 0;
}

.psd-jar {
  position: relative;
  display: block;
  width: 14px;
  height: 36px;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-item:hover .stool-trio .psd-jar:nth-child(1) {
  transform: translateY(-2px) rotate(-4deg);
}
.exam-item:hover .stool-trio .psd-jar:nth-child(2) {
  transform: translateY(-3.5px);
}
.exam-item:hover .stool-trio .psd-jar:nth-child(3) {
  transform: translateY(-2px) rotate(4deg);
}

/* Tapa Roja con Rosca y Bisel (Centrada Milimétricamente) */
.psd-jar:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 15px;
  height: 6.5px;
  border: 1px solid rgba(19, 65, 87, 0.25);
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.55), 
    inset 0 -1px 2px rgba(0, 0, 0, 0.35), 
    0 1.5px 3px rgba(19, 65, 87, 0.12);
}

/* Frasco Cónico Delgado + Paleta Roja Interna + Líquido Fijador Transparente */
.psd-jar:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  top: 6px;
  bottom: 0;
  clip-path: polygon(14% 100%, 86% 100%, 100% 0, 0 0);
  
  background: 
    /* 1. Paleta Roja (vástago vertical montado en la tapa) */
    linear-gradient(90deg, 
      transparent calc(50% - 1px), 
      #dc2626 calc(50% - 0.75px), 
      #b91c1c calc(50% + 0.75px), 
      transparent calc(50% + 1px)
    ),
    /* 2. Cucharilla / espátula en el extremo inferior de la paleta */
    radial-gradient(ellipse 2px 3.5px at 50% 21px, #dc2626 85%, rgba(220,38,38,0) 100%),
    /* 3. Líquido Fijador Transparente / Cristalino con menisco superior */
    linear-gradient(180deg, 
      transparent 0% 40%, 
      rgba(255, 255, 255, 0.8) 40% 42%, 
      rgba(224, 242, 254, 0.45) 42% 70%, 
      rgba(186, 230, 253, 0.6) 100%
    ),
    /* 4. Plástico transparente con refracción y graduaciones */
    linear-gradient(90deg, 
      rgba(255, 255, 255, 0.5) 0%, 
      rgba(240, 248, 255, 0.1) 20%, 
      rgba(255, 255, 255, 0.25) 50%, 
      rgba(255, 255, 255, 0.7) 80%, 
      rgba(200, 230, 245, 0.25) 100%
    );
  
  filter: drop-shadow(0 1.5px 2.5px rgba(19, 65, 87, 0.1));
}

/* ==========================================================================
   COMPONENTE: .swab-tube (Tórula con Medio de Transporte Stuart - Tubo Delgado)
   ========================================================================== */
.swab-tube {
  position: relative;
  display: block;
  width: 14px;
  height: 48px;
  margin: 0 8px 0 14px;
  align-self: center;
  flex-shrink: 0;
  
  border: 1.5px solid rgba(19, 65, 87, 0.22);
  border-top: 0;
  border-radius: 2px 2px 7px 7px;
  
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0.55) 0%, 
    rgba(230, 245, 255, 0.1) 20%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.75) 80%, 
    rgba(200, 230, 245, 0.25) 100%
  );
  box-shadow: 
    inset -1.5px 0 3px rgba(255, 255, 255, 0.6), 
    inset 1.5px 0 3px rgba(19, 65, 87, 0.08), 
    0 3px 6px rgba(19, 65, 87, 0.06);
  
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-item:hover .swab-tube {
  transform: translateY(-2px) rotate(4deg);
}

/* Tapa Azul Royal Esbelta (Centrada Milimétricamente) */
.swab-tube:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: -5px;
  width: 16px;
  height: 8px;
  border: 1px solid rgba(19, 65, 87, 0.28);
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.55), 
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.35), 
    0 2px 4px rgba(19, 65, 87, 0.12);
}

/* Tórula Delgada (Varilla + Punta de algodón) en Medio Stuart */
.swab-tube:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 1.5px;
  width: 10px;
  border-radius: 0 0 5px 5px;
  z-index: 1;
  
  background: 
    /* 1. Varilla blanca de la tórula (eje fino de 1.5px) */
    linear-gradient(90deg, 
      transparent calc(50% - 1px), 
      #ffffff calc(50% - 0.75px), 
      #cbd5e1 calc(50% + 0.75px), 
      transparent calc(50% + 1px)
    ),
    /* 2. Punta de algodón algodonosa */
    radial-gradient(circle 2px at 50% 32px, #ffffff 85%, rgba(255,255,255,0) 100%),
    /* 3. Medio de transporte Stuart (Gel azulado) */
    linear-gradient(180deg, 
      transparent 0% 55%, 
      rgba(186, 230, 253, 0.7) 55% 58%, 
      rgba(125, 211, 252, 0.85) 100%
    );
  
  box-shadow: inset 0 -1px 2px rgba(14, 116, 144, 0.2);
}

/* ==========================================================================
   COMPONENTE: .urine-cup (Frasco Clínico de Orina Tapa Roja / Tipo Macetero)
   ========================================================================== */
.urine-cup {
  position: relative;
  display: block;
  width: 28px;
  height: 38px;
  margin: 0 3px 0 8px;
  align-self: center;
  flex-shrink: 0;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-item:hover .urine-cup {
  transform: translateY(-2px) rotate(4deg);
}

/* Tapa Roja de Rosca con Relieve y Borde (Centrada Milimétricamente) */
.urine-cup:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 28px;
  height: 8px;
  border: 1px solid rgba(19, 65, 87, 0.25);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  box-shadow: 
    inset 0 1.5px 2px rgba(255, 255, 255, 0.55), 
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.35), 
    0 2px 4px rgba(19, 65, 87, 0.12);
}

/* Cuerpo Cónico / Macetero (Más ancho arriba, más angosto en la base) */
.urine-cup:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  top: 7px;
  bottom: 0;
  clip-path: polygon(14% 100%, 86% 100%, 100% 0, 0 0);
  
  /* Gradiente: Medidor graduado + Muestra dorada/ámbar de orina + Plástico transparente */
  background: 
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(19, 65, 87, 0.2) 5px 6px, transparent 6px 10px),
    linear-gradient(180deg, 
      transparent 0% 42%, 
      #fef08a 42% 45%, 
      #facc15 45% 72%, 
      #d97706 100%
    ),
    linear-gradient(90deg, 
      rgba(255, 255, 255, 0.6) 0%, 
      rgba(240, 248, 255, 0.15) 20%, 
      rgba(255, 255, 255, 0.3) 50%, 
      rgba(255, 255, 255, 0.75) 80%, 
      rgba(200, 230, 245, 0.3) 100%
    );
  filter: drop-shadow(0 2px 3px rgba(19, 65, 87, 0.12));
}

/* ==========================================================================
   COMPONENTE: .lab-tube (Contorno Nítido y Volumen Incompresible)
   ========================================================================== */
.lab-tube {
  --cap: #828d96;
  --fill: 25px;
  --travel: -19px;
  
  position: relative;
  display: block;
  width: 22px;
  height: 46px;
  margin: 0 4px 0 10px;
  align-self: center;
  
  /* Perímetro del cristal bien delimitado */
  border: 1.5px solid rgba(19, 65, 87, 0.22);
  border-top: 0;
  border-radius: 2px 2px 11px 11px;
  
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(230, 245, 255, 0.1) 20%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.75) 80%, 
    rgba(200, 230, 245, 0.25) 100%
  );
  box-shadow: 
    inset -2px 0 4px rgba(255, 255, 255, 0.6), 
    inset 2px 0 4px rgba(19, 65, 87, 0.08), 
    0 3px 6px rgba(19, 65, 87, 0.06);
  
  transform: translateZ(0);
  will-change: transform;
}

/* Tapa de Goma con Contorno y Relieve Nítido (Centrada Milimétricamente) */
.lab-tube:before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  top: -5px;
  width: 24px;
  height: 9px;
  border: 1px solid rgba(19, 65, 87, 0.28);
  border-radius: 3px 3px 2px 2px;
  background: var(--cap);
  box-shadow: 
    inset 0 1.5px 2px rgba(255, 255, 255, 0.55), 
    inset 0 -2px 3px rgba(0, 0, 0, 0.35), 
    0 2px 4px rgba(19, 65, 87, 0.12);
}

/* Masa Líquida Estricta (Volumen 100% Constante, Centrado Milimétrico) */
.lab-tube:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.5px;
  width: 17px;
  height: var(--fill);
  z-index: 1;
  border-radius: 0 0 8px 8px;
  
  /* Contorno y menisco superior nítido de sangre */
  border-top: 1.5px solid #dc2626;
  box-shadow: 
    inset 0 1px 2px rgba(255, 200, 200, 0.35), 
    inset 0 -1px 3px rgba(0, 0, 0, 0.4);
  
  /* Sangre venosa clínica real */
  background: linear-gradient(
    180deg, 
    #b91c1c 0%, 
    #991b1b 45%, 
    #6b1116 100%
  );
  opacity: 0.95;
  
  transform-origin: center center;
  will-change: transform, border-radius;
}

/* ==========================================================================
   CONFIGURACIÓN CROMÁTICA Y VOLUMÉTRICA ESTRICTA (44px área útil)
   ========================================================================== */
.lab-tube.lila     { --cap: #9b62b5; --fill: 24px; --travel: -19px; } /* EDTA */
.lab-tube.amarilla { --cap: #e6b928; --fill: 28px; --travel: -15px; } /* Gel separador */
.lab-tube.celeste  { --cap: #64b9df; --fill: 22px; --travel: -21px; } /* Citrato */
.lab-tube.verde    { --cap: #49a36f; --fill: 26px; --travel: -17px; } /* Heparina */
.lab-tube.gris     { --cap: #828d96; --fill: 24px; --travel: -19px; } /* Fluoruro */
.lab-tube.roja     { --cap: #d74747; --fill: 27px; --travel: -16px; } /* Tubo Seco */

/* ==========================================================================
   DINÁMICAS DE INTERACCIÓN (MEZCLADO CLÍNICO POR INVERSIÓN)
   ========================================================================== */
.exam-item:hover .lab-tube {
  animation: organicInversionMix 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

.exam-item:hover .lab-tube:after {
  animation: organicLiquidPhysics 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   MOTORES DE ANIMACIÓN (GPU 120 FPS - VOLUMEN RÍGIDO CONSERVADO)
   ========================================================================== */

/* Inversión del Tubo en 360° continuos */
@keyframes organicInversionMix {
  0% { transform: scale(1.02) rotate(0deg); }
  45%, 55% { transform: scale(1.02) rotate(-180deg); }
  100% { transform: scale(1.02) rotate(-360deg); }
}

/* Desplazamiento del Líquido Centrado sin alteración de volumen */
@keyframes organicLiquidPhysics {
  0% {
    transform: translateX(-50%) translateY(0) skewX(0deg);
    border-radius: 0 0 8px 8px;
  }
  /* 22% (Giro intermedio a 90°): Inercia angular leve */
  22% {
    transform: translateX(-50%) translateY(calc(var(--travel) * 0.45)) skewX(-4deg);
    border-radius: 2px 2px 6px 6px;
  }
  /* 45%-55% (Invertido a 180°): Apoyo plano y exacto en la base de la tapa */
  45%, 55% {
    transform: translateX(-50%) translateY(var(--travel)) skewX(0deg);
    border-radius: 2px 2px 2px 2px;
  }
  /* 78% (Retorno a 270°): Inercia contraria constante */
  78% {
    transform: translateX(-50%) translateY(calc(var(--travel) * 0.45)) skewX(4deg);
    border-radius: 6px 6px 2px 2px;
  }
  100% {
    transform: translateX(-50%) translateY(0) skewX(0deg);
    border-radius: 0 0 8px 8px;
  }
}

.empty { padding: 28px 14px; text-align: center; color: var(--muted); border: 1px dashed #bfd1da; border-radius: 14px; }
.content-head { padding: 25px 28px 19px; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, #fff 0%, #f5fbfc 100%); }
.record-back { border: 0; background: transparent; color: #37677a; padding: 0; margin: 0 0 10px; font-weight: 750; font-size: 13px; }
.record-back:hover { color: var(--blue); }
.breadcrumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.title-row { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; }
.title-row h2 { margin: 0; color: var(--navy); font-size: 29px; line-height: 1.2; }
.meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.tag { padding: 6px 9px; border-radius: 8px; background: #eaf4f7; color: #406276; font-size: 12px; font-weight: 650; }
.price { min-width: 190px; background: #e8f8f4; border: 1px solid #bce8dc; border-radius: 16px; padding: 13px 16px; text-align: right; }
.price span { display: block; color: #367568; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.price strong { display: block; color: #075e55; font-size: 24px; margin-top: 3px; }
.price small { display: block; color: #54796f; margin-top: 2px; }
.price.pending { background: var(--warning-bg); border-color: #f0d88d; }
.price.pending strong { font-size: 14px; color: var(--warning); margin-top: 6px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 25px; border-bottom: 1px solid var(--line); background: #fbfdfe; }
.tab { border: 0; background: transparent; color: #597183; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tab:hover { background: #eef6f8; }
.tab.active { background: var(--navy); color: #fff; }
.detail { padding: 24px 28px 30px; overflow: auto; }
.hero-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 560px; padding: 40px 42px; }
.hero-empty h2 { font-size: 30px; color: var(--navy); margin: 0 0 10px; }
.hero-empty p { max-width: 650px; color: var(--muted); line-height: 1.55; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 14px; width: min(680px, 100%); margin-top: 20px; }
.quick button { border: 0; background: #fff; color: #195a72; border-radius: 18px; padding: 18px 14px; font-weight: 750; box-shadow: 0 8px 24px rgba(19,65,87,.06); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.quick button:hover, .quick button.active { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(19,65,87,.12); background: linear-gradient(135deg, #ffffff 0%, #f0f9fb 100%); color: var(--blue); }
.quick button small { display: block; color: #6b8493; font-weight: 500; font-size: 11px; margin-top: 3px; }
.quick-results { width: min(780px, 100%); margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.quick-results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.quick-results h3 { margin: 0; color: var(--navy); font-size: 16px; }
.quick-result-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; max-height: 205px; overflow-y: auto; padding: 2px 5px 2px 2px; }
.quick-result { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 11px; text-align: left; color: var(--navy); font-weight: 700; font-size: 12px; }
.quick-result:hover { border-color: var(--blue); background: #effafd; }
.quick-result small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }
.quick-back { flex: 0 0 auto; border: 1px dashed #a9c9d5; background: #f8fcfd; color: #37677a; border-radius: 11px; padding: 8px 12px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 17px; padding: 18px; background: #fff; }
.card.full { grid-column: 1 / -1; }
.card .icon { width: 38px; height: 38px; border-radius: 11px; background: #e6f5f8; color: var(--blue); display: grid; place-items: center; font-size: 19px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.card p { margin: 0; color: #3e5669; line-height: 1.55; }
.card ul, .card ol { margin: 8px 0 0; padding-left: 20px; color: #3e5669; line-height: 1.6; }
.source { border-top: 1px solid #e5edf1; margin-top: 14px; padding-top: 10px; color: #738896; font-size: 11px; }
.notice { border-radius: 14px; padding: 13px 15px; line-height: 1.5; font-size: 13px; }
.notice.warn { background: var(--warning-bg); color: #795500; border: 1px solid #efd483; }
.notice.safe { background: #e9f8f4; color: #17675d; border: 1px solid #bce6dc; }
.critical { background: var(--danger-bg); border-color: #f2c4c4; }
.critical h3 { color: var(--danger); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px; }
.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.section-title { margin: 0 0 15px; color: var(--navy); font-size: 19px; }
.footer-note { border-top: 1px solid var(--line); padding: 12px 28px; color: #728794; font-size: 11px; background: #fbfdfe; }

@media(max-width: 980px) {
  .app { grid-template-columns: 330px 1fr; }
  .title-row { display: block; }
  .price { text-align: left; margin-top: 14px; min-width: 0; }
  .grid { grid-template-columns: 1fr; }
  .card.full { grid-column: auto; }
}
@media(max-width: 720px) {
  .header { height: 76px; padding: 0 14px; }
  .brand img { width: 52px; height: 52px; }
  .brand strong { font-size: 16px; }
  .brand span { display: none; }
  .status { font-size: 0; padding: 9px; }
  .app { display: block; padding: 10px; }
  .sidebar, .content { border-radius: 18px; }
  .sidebar { position: static; height: 62vh; max-height: 620px; margin-bottom: 10px; }
  .content { min-height: 65vh; }
  .content-head, .detail { padding: 19px; }
  .title-row h2 { font-size: 23px; }
  .tabs { padding: 10px; flex-wrap: nowrap; overflow-x: auto; }
  .hero-empty { min-height: 500px; padding: 22px 14px; }
  .quick { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
  .quick-result-list { grid-template-columns: 1fr; }
}
