/* Certifycars · herramienta de trabajo: superficies definidas, jerarquía clara y densidad de oficina. Claro y oscuro. */
@font-face { font-family: "Space Grotesk"; src: url("/fuentes/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fuentes/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --fondo: #F2F4F7; --tinta: #0F2540; --suave: #55637A;
  --bloque: #FFFFFF; --bloque2: #E8ECF2; --linea: #D9DFE8;
  --marino: #0F2540; --marino2: #1D3A60; --sobre-marino: #B9C6D6;
  --verde: #35D07F; --verde-texto: #0E7A41; --verde-suave: #E3F6EB; --verde-linea: #A9DFC0;
  --ambar-fondo: #FFF4D1; --ambar-texto: #6B4E00; --ambar-linea: #EBD189;
  --rojo: #B80F2A; --rojo-suave: #FCE9EC; --rojo-linea: #F0B7C0;
  --menu: #FFFFFF; --menu-icono: #6B7890;
  --sombra: 0 1px 2px rgba(15, 37, 64, .06);
  --r-caja: 14px; --r-control: 10px; --r-marca: 6px;
  --titulo: "Space Grotesk", system-ui, sans-serif; --texto: "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0A1626; --tinta: #F3F6FA; --suave: #9FB0C6;
    --bloque: #122238; --bloque2: #1C3350; --linea: #223A59;
    --marino: #163052; --marino2: #21436F; --sobre-marino: #AFC0D6;
    --verde-texto: #4ADB8F; --verde-suave: #0E3324; --verde-linea: #1C5A3E;
    --ambar-fondo: #33290B; --ambar-texto: #FFD666; --ambar-linea: #5C4A14;
    --rojo: #FF8FA0; --rojo-suave: #361420; --rojo-linea: #6A2233;
    --menu: #0E1D31; --menu-icono: #8FA1B9;
    --sombra: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: var(--texto); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-feature-settings: "cv11", "ss01"; }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--verde-texto); outline-offset: 2px; }

#vista { max-width: 640px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(84px + env(safe-area-inset-bottom)); }
#vista.sin-menu { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
#vista.ancha { max-width: 1100px; }

/* Barra de arriba: se queda fija y separa la app del contenido */
.cabecera { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: calc(-14px - env(safe-area-inset-top)) -16px 0; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; min-height: 56px;
  background: color-mix(in srgb, var(--fondo) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--linea); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .c1 { stroke: var(--tinta); } .logo .c2 { stroke: var(--verde-texto); }
.cabecera .logo::after { content: "Certifycars"; font-family: var(--titulo); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.marca { font-family: var(--titulo); font-size: 22px; letter-spacing: -0.02em; font-weight: 400; }
.marca b { font-weight: 700; }
.pastilla { font-size: 13px; font-weight: 600; background: var(--bloque); border: 1px solid var(--linea); border-radius: var(--r-control); padding: 0 12px; white-space: nowrap;
  min-height: 36px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; box-shadow: var(--sombra); }
.atras { width: 38px; height: 38px; border-radius: var(--r-control); border: 1px solid var(--linea); background: var(--bloque); display: grid; place-items: center; text-decoration: none; flex: none; box-shadow: var(--sombra); }
.atras svg, .icono { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.titulo { font-family: var(--titulo); font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.titulo2 { font-family: var(--titulo); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; }
.sub { color: var(--suave); font-size: 14px; }
.nota { color: var(--suave); font-size: 12.5px; line-height: 1.45; }
.fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.linea-base { align-items: baseline; }
.columna { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hueco { flex: 1; }

/* Superficies */
.bloque { background: var(--bloque); border: 1px solid var(--linea); border-radius: var(--r-caja); padding: 14px 16px; box-shadow: var(--sombra); }
.bloque.grande { border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
a.bloque { text-decoration: none; }
.bloque.marino { background: var(--marino); border-color: var(--marino); color: #FFFFFF; box-shadow: 0 10px 24px -14px rgba(15, 37, 64, .7); position: relative; overflow: hidden; }
.bloque.marino::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--verde); }
.bloque.marino .nota, .bloque.marino .sub { color: var(--sobre-marino); }
.bloque.verde { background: var(--verde-suave); border-color: var(--verde-linea); }
.bloque.ambar { background: var(--ambar-fondo); border-color: var(--ambar-linea); color: var(--ambar-texto); }
.bloque.rojo { background: var(--rojo-suave); border-color: var(--rojo-linea); color: var(--rojo); }
.bloque.ambar .nota, .bloque.rojo .nota { color: inherit; opacity: .85; }
.matricula { font-family: var(--titulo); font-weight: 700; letter-spacing: 0.02em; font-size: 20px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.matricula.enorme { font-size: 40px; letter-spacing: 0.01em; }
.cifra { font-family: var(--titulo); font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pareja { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pareja > a.bloque { transition: border-color .12s; }
.etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }
.etiqueta { font-size: 11.5px; font-weight: 600; border-radius: var(--r-marca); padding: 3px 8px; white-space: nowrap; background: var(--bloque2); line-height: 1.5; }
.marino .etiqueta { background: var(--marino2); color: #FFFFFF; font-size: 12.5px; padding: 4px 10px; }
.etiqueta.ambar { background: var(--ambar-fondo); color: var(--ambar-texto); box-shadow: inset 0 0 0 1px var(--ambar-linea); }
.etiqueta.rojo { background: var(--rojo-suave); color: var(--rojo); box-shadow: inset 0 0 0 1px var(--rojo-linea); }
.etiqueta.verde { background: var(--verde-suave); color: var(--verde-texto); box-shadow: inset 0 0 0 1px var(--verde-linea); }
.punto { width: 8px; height: 8px; border-radius: 999px; background: var(--suave); display: inline-block; flex: none; }
.punto.verde { background: var(--verde); } .punto.ambar { background: #E0A800; } .punto.rojo { background: var(--rojo); }
.estado { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--suave); }

/* Listas */
.lista { display: flex; flex-direction: column; gap: 8px; }
.tarjeta { background: var(--bloque); border: 1px solid var(--linea); border-radius: var(--r-caja); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; width: 100%; text-align: left; min-height: 64px; box-shadow: var(--sombra); }
a.tarjeta::after, button.tarjeta::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--menu-icono); border-top: 2px solid var(--menu-icono); transform: rotate(45deg); flex: none; margin-right: 4px; }
.tarjeta:active { background: var(--bloque2); }
.tarjeta .nombre { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.nombre { font-weight: 600; }
.apagada { opacity: .55; }

.buscar { display: flex; align-items: center; gap: 10px; background: var(--bloque); border: 1px solid var(--linea); border-radius: var(--r-control); padding: 0 14px; min-height: 46px; color: var(--suave); box-shadow: var(--sombra); }
.buscar:focus-within { border-color: var(--verde-texto); }
.buscar input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 44px; color: var(--tinta); outline: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 36px; border: 1px solid var(--linea); border-radius: var(--r-control); padding: 0 12px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--bloque); flex: none; }
.chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--fondo); }

/* Botones */
.principal { width: 100%; min-height: 56px; border: 0; border-radius: 12px; background: var(--verde); color: #0B2038; padding: 8px 16px 8px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; text-align: left; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px -8px rgba(18, 137, 74, .8); }
.principal small { display: block; font-size: 12.5px; font-weight: 500; opacity: .8; }
.principal .flecha { display: grid; place-items: center; flex: none; }
.principal .flecha .icono { width: 22px; height: 22px; stroke-width: 2.4; }
.principal:disabled { opacity: .45; box-shadow: none; }
/* Los botones del final van con el contenido: nada flota ni se mueve a otro ritmo al desplazar la pantalla */
.pie { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.segundo { min-height: 44px; border-radius: var(--r-control); border: 1px solid var(--linea); background: var(--bloque); padding: 0 16px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; box-shadow: var(--sombra); }
.segundo:active { background: var(--bloque2); }
.segundo.peligro { background: transparent; border-color: var(--rojo-linea); color: var(--rojo); box-shadow: none; }
.segundo.ancho { width: 100%; }
.segundo:disabled { opacity: .5; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo span { font-size: 12.5px; font-weight: 600; color: var(--suave); }
.campo input, .campo select { min-height: 46px; border-radius: var(--r-control); border: 1px solid var(--linea); background: var(--bloque); padding: 0 12px; width: 100%; outline: none; appearance: none; }
.campo select { background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.campo input:focus, .campo select:focus { border-color: var(--verde-texto); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 28%, transparent); }
.campo input::placeholder, .campo textarea::placeholder { color: color-mix(in srgb, var(--suave) 65%, transparent); }
.campo input.oculto { -webkit-text-security: disc; }
.campo input.pin { font-family: var(--titulo); font-size: 26px; letter-spacing: 0.25em; text-align: center; font-weight: 700; min-height: 60px; }
form { display: flex; flex-direction: column; gap: 12px; }
.error { background: var(--rojo-suave); color: var(--rojo); border: 1px solid var(--rojo-linea); border-radius: var(--r-control); padding: 10px 14px; font-size: 13.5px; font-weight: 600; }

.datos { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.datos dt { color: var(--suave); } .datos dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.cambio { font-size: 13.5px; padding: 10px 0; border-top: 1px solid var(--linea); }
.cambio:first-child { border-top: 0; padding-top: 2px; }
.cambio:last-child { padding-bottom: 2px; }
.cambio.fila .segundo { flex: none; }
.tachado { text-decoration: line-through; color: var(--suave); }

/* Menú: barra pegada abajo con nombre en cada sección */
#menu { position: fixed; left: 0; right: 0; bottom: 0; background: var(--menu); border-top: 1px solid var(--linea); padding: 0 6px env(safe-area-inset-bottom);
  display: flex; z-index: 5; }
#menu a { flex: 1; min-width: 0; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--menu-icono);
  font-size: 10.5px; font-weight: 600; text-decoration: none; position: relative; }
#menu a .icono { width: 21px; height: 21px; }
#menu a span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu a[aria-current="page"] { color: var(--tinta); }
#menu a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--verde); }

#aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(74px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px);
  background: var(--tinta); color: var(--fondo); border-radius: var(--r-control); padding: 11px 16px; font-size: 13.5px; font-weight: 600; z-index: 9; text-align: center;
  box-shadow: 0 10px 30px -10px rgba(8, 20, 40, .55); }
dialog { border: 1px solid var(--linea); border-radius: 16px; padding: 20px; background: var(--bloque); color: var(--tinta); width: min(calc(100% - 32px), 420px); box-shadow: 0 30px 60px -20px rgba(8, 20, 40, .5); }
dialog::backdrop { background: rgba(8, 20, 40, .55); }
dialog .contenido { display: flex; flex-direction: column; gap: 12px; }
.secreto { font-family: var(--titulo); font-size: 32px; font-weight: 700; letter-spacing: 0.08em; text-align: center; background: var(--verde-suave); border: 1px solid var(--verde-linea); border-radius: var(--r-caja); padding: 14px 8px; user-select: all; overflow-wrap: anywhere; }

.secreto.clave-larga { font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: 0; }
.entrada { justify-content: center; }
.entrada .logo svg { width: 56px; height: 56px; }
.entrada .marca { font-size: 32px; }

@media (min-width: 900px) {
  .rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  .chips { margin: 0; padding: 0; flex-wrap: wrap; }
}

@media print {
  :root { --fondo: #FFFFFF; --tinta: #0F2540; }
  #menu, #aviso, .no-imprimir { display: none !important; }
  #vista { max-width: none; padding: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .tarjeta, .chip, .principal, .segundo { transition: background-color .12s, border-color .12s, transform .12s; }
  .principal:active { transform: scale(.985); }
}
@media (hover: hover) {
  a.tarjeta:hover, .pareja > a.bloque:hover, .segundo:hover, .pastilla:hover, a.chip:hover, button.chip:hover { border-color: var(--menu-icono); }
  .segundo.peligro:hover { border-color: var(--rojo); }
}

/* inspección */
#vista.a-sangre { max-width: none; padding: 0; }
.camara { position: fixed; inset: 0; background: #0A1A2F; color: #FFFFFF; display: flex; flex-direction: column; }
.visor { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; border-radius: 0 0 18px 18px; }
.visor video, .visor .congelada { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-arriba { position: relative; z-index: 2; padding: calc(12px + env(safe-area-inset-top)) 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
.camara .etiqueta { background: rgba(10,26,47,.88); color: #FFFFFF; font-size: 13.5px; padding: 7px 12px; border-radius: 8px; }
.camara .atras { background: rgba(10,26,47,.88); border-color: transparent; color: #FFFFFF; font-size: 18px; width: 44px; height: 44px; }
.camara .atras[aria-pressed="true"] { background: #FFD666; color: #0F2540; }
.sin-camara { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 40px; color: #C9D3DE; }
.panel { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.donde { display: grid; grid-template-columns: 124px 1fr; gap: 14px; align-items: center; }
.panel .titulo2 { font-size: 20px; line-height: 1.2; }
.panel .nota { color: #C9D3DE; font-size: 14px; line-height: 1.35; }
.panel .bloque { color: #6B4E00; background: #FFF1C2; border-color: #EBD189; }
.plano { width: 124px; height: auto; display: block; }
.tarjeta .columna > .etiqueta { align-self: flex-start; }
.plano .caja { fill: #1B3A61; stroke: #C9D3DE; stroke-width: 2; }
.plano .linea { fill: none; stroke: #C9D3DE; stroke-width: 1.6; stroke-linejoin: round; }
.plano .volante { fill: none; stroke: #6F8196; stroke-width: 1.5; }
.plano .rotulo { fill: #A9B8CC; font: 600 8px var(--texto); text-anchor: middle; letter-spacing: .08em; }
.plano .sitio { fill: #132B4A; stroke: #6F8196; stroke-width: 1.5; }
.plano .sitio.hecho { fill: #1E6B45; stroke: #1E6B45; }
.plano .sitio.ahora { fill: #35D07F; stroke: #FFFFFF; stroke-width: 2; }
.plano .haz { fill: #35D07F; opacity: .35; }
.plano .num { fill: #A9B8CC; font: 600 9px var(--texto); text-anchor: middle; }
.plano .num.ahora { fill: #0F2540; font-weight: 700; }
.plano .tic { fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.disparo { width: 74px; height: 74px; border-radius: 999px; border: 5px solid #FFFFFF; background: var(--verde); margin: 0 auto; display: block; }
.disparo:active { transform: scale(.94); }
.fotos .mal { color: var(--rojo); font-weight: 600; }
@media (orientation: landscape) and (max-height: 520px) {
  .camara { flex-direction: row; }
  .visor { border-radius: 0 26px 26px 0; }
  .panel { width: 300px; justify-content: center; }
}
.dato-oscuro { background: var(--marino2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.chip.grande { min-height: 54px; font-size: 16px; width: 100%; background: var(--fondo); }
.chip.grande[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #0B2038; }
.extra { margin-top: 6px; gap: 10px; }
.voz { display: flex; flex-direction: column; gap: 8px; }
.voz audio, .bloque audio { width: 100%; }
.grabando { background: var(--rojo-suave); color: var(--rojo); }
.hecho { width: 84px; height: 84px; border-radius: 999px; background: var(--verde); color: #0F2540; display: grid; place-items: center; }
.hecho .icono { width: 48px; height: 48px; stroke-width: 2.6; }
.invisible { visibility: hidden; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fotos a { text-decoration: none; background: var(--bloque); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bloque2); }
.fotos span { font-size: 12px; padding: 8px 10px; color: var(--suave); }
.dano { display: flex; gap: 12px; align-items: flex-start; }
.dano img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.dano .segundo { align-self: flex-start; background: var(--fondo); }
.segundo.claro { background: #FFFFFF; color: #0F2540; }
.camara .acciones { justify-content: center; }
.tarjeta .etiquetas { margin-top: 2px; }
form.bloque { gap: 12px; }
form.bloque .campo input, form.bloque .campo select, form.bloque .campo textarea, form.bloque .segundo { background-color: var(--fondo); }
.camara .segundo { background: #1B3A61; border-color: #1B3A61; color: #FFFFFF; box-shadow: none; }
.camara .segundo.claro { background: #FFFFFF; color: #0F2540; }

/* IA */
.segundo.elegido { background: var(--tinta); border-color: var(--tinta); color: var(--fondo); }
.nota.mal { color: var(--rojo); }
.titulo2 .etiqueta { vertical-align: middle; margin-left: 6px; }
details > summary { cursor: pointer; padding: 6px 0; }
details[open] > summary { margin-bottom: 8px; }

/* golpes */
.campo textarea { border-radius: var(--r-control); border: 1px solid var(--linea); background: var(--bloque); padding: 11px 12px; width: 100%; outline: none; font: inherit; color: inherit; resize: vertical; }
.campo textarea:focus { border-color: var(--verde-texto); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 28%, transparent); }
a.segundo.peligro { text-decoration: none; }
.bloque.rojo a { color: inherit; }
.informe { background: #FFFFFF; color: #111111; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.informe h1 { font-family: var(--titulo); font-size: 26px; margin: 0; }
.informe h2 { font-family: var(--titulo); font-size: 16px; margin: 14px 0 0; border-bottom: 1px solid #CCCCCC; padding-bottom: 4px; }
.informe .sub, .informe .nota, .informe .datos dt { color: #555555; }
.informe .datos dd { text-align: left; }
.informe .texto { white-space: pre-wrap; margin: 0; }
.fotos-informe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fotos-informe figure { margin: 0; break-inside: avoid; }
.fotos-informe img { width: 100%; display: block; border: 1px solid #CCCCCC; }
.fotos-informe figcaption { font-size: 12px; color: #555555; }
@media print {
  .no-imprimir, #menu, #aviso { display: none !important; }
  body, #vista { background: #FFFFFF !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .informe { padding: 0; border-radius: 0; }
}

/* escritorio: barra lateral fija con la marca y el contenido a todo el ancho útil */
@media (min-width: 900px) {
  body:has(#menu:not([hidden])) { padding-left: 232px; }
  #menu { top: 0; right: auto; width: 232px; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 18px 12px; background: #0F2540; border-top: 0; border-right: 1px solid #1D3A60; }
  #menu::before { content: "Certifycars"; font-family: var(--titulo); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: #FFFFFF; padding: 4px 12px 18px; }
  #menu a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: #B9C6D6; }
  #menu a .icono { width: 18px; height: 18px; }
  #menu a:hover { background: #17304F; color: #FFFFFF; }
  #menu a[aria-current="page"] { background: #1D3A60; color: #FFFFFF; }
  #menu a[aria-current="page"]::before { top: 9px; bottom: 9px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  #vista { max-width: 780px; padding: 20px 32px 40px; gap: 16px; }
  #vista.ancha { max-width: 1400px; }
  .cabecera { margin: -20px -32px 0; padding: 10px 32px; }
  body:has(#menu:not([hidden])) .cabecera .logo { display: none; }
  body:has(#menu:not([hidden])) .cabecera:has(> .logo:first-child) { justify-content: flex-end; }
  .titulo { font-size: 30px; }
  #aviso { bottom: 28px; }
  .fotos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .pie { margin-top: 8px; align-items: flex-start; }
  .pie .principal, .pie .segundo.ancho { width: auto; min-width: 320px; }
}
@media print { body { padding-left: 0 !important; } }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }

/* taller y expediente */
.fotos.comparar { grid-template-columns: 1fr 1fr; }
.sin-foto { border: 1px dashed var(--linea); border-radius: 12px; display: grid; place-items: center; text-align: center; padding: 16px; min-height: 120px; color: var(--suave); font-size: 12.5px; }
.texto-largo { white-space: pre-wrap; overflow-wrap: anywhere; }
.marca-casilla { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.marca-casilla input { width: 20px; height: 20px; accent-color: var(--verde-texto); flex: none; }
details.bloque > summary { font-weight: 600; padding: 0; }
details.bloque[open] > summary { margin-bottom: 12px; }
details.bloque .lista .bloque { box-shadow: none; background: var(--fondo); }
.bloque a:not(.segundo):not(.principal) { text-decoration-color: var(--linea); text-underline-offset: 3px; }
a.bloque.fila { text-decoration: none; }
dialog .principal { justify-content: center; }
.sin-borde { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fotos [data-quitar] { cursor: pointer; }
.cambio.fila > a { text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
