/* Aprobar — sobrio y claro para el móvil: letra grande, botones grandes, sin jerga. */
:root {
  --texto: #16181b;
  --suave: #4b5157;
  --linea: #d9dde1;
  --fondo: #f3f4f6;
  --tarjeta: #ffffff;
  --verde: #17753a;
  --verde-oscuro: #0f5a2b;
  --verde-claro: #e7f4ec;
  --rojo: #b3261e;
  --rojo-claro: #fbeceb;
  --ambar: #8a5a00;
  --ambar-claro: #fff4d6;
  --radio: 8px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fondo);
}
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; }
a { color: var(--verde-oscuro); }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

/* ——— cabecera ——— */
.cabecera { background: var(--tarjeta); border-bottom: 1px solid var(--linea); }
.cabecera-dentro { max-width: 640px; margin: 0 auto; padding: 16px 16px 14px; }
.cabecera-marca { margin: 0 0 2px; color: var(--suave); font-size: 16px; font-weight: 600; }
.cabecera h1 { font-size: 26px; }

/* ——— botones (esquinas poco redondeadas, nada de píldoras) ——— */
.boton {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; padding: 12px 18px;
  border: 2px solid transparent; border-radius: var(--radio);
  font: inherit; font-size: 20px; font-weight: 700; line-height: 1.2; text-align: center;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.boton:disabled { opacity: .6; cursor: default; }
.boton-aprobar { background: var(--verde); color: #fff; }
.boton-aprobar:active { background: var(--verde-oscuro); }
.boton-no { background: var(--tarjeta); color: var(--rojo); border-color: var(--rojo); list-style: none; }
.boton-no::-webkit-details-marker { display: none; }
.boton-secundario { background: var(--tarjeta); color: var(--texto); border-color: var(--linea); font-weight: 600; }
.boton-grabar { background: var(--rojo); color: #fff; min-height: 72px; font-size: 22px; }
.boton-parar { background: var(--texto); color: #fff; }
.boton-enviar { background: var(--texto); color: #fff; margin-top: 14px; }
.icono-micro { flex: none; }

/* ——— cliente ——— */
.cliente { max-width: 640px; margin: 0 auto; padding: 0 0 48px; }
.plazo { background: var(--tarjeta); border-bottom: 1px solid var(--linea); padding: 12px 16px; }
.barra-plazo {
  position: sticky; top: 0; z-index: 5; margin: 0;
  padding: 8px 16px; background: var(--texto); color: #fff;
  font-size: 17px; font-weight: 700; text-align: center;
}
.plazo p { margin: 0; }
.plazo-texto { font-size: 21px; font-weight: 700; }
.plazo-cuenta { color: var(--suave); }
.plazo-ayuda { margin-top: 6px !important; color: var(--suave); font-size: 17px; }
.plazo-urgente { margin: 8px 0 4px !important; padding: 10px 12px; background: var(--ambar-claro); color: var(--ambar); border-left: 5px solid var(--ambar); border-radius: 4px; font-weight: 700; }
.plazo-cerrado .plazo-texto { font-size: 19px; }
.vacio, .aviso-pagina { max-width: 640px; margin: 24px auto; padding: 0 16px; }
.vacio h2, .aviso-pagina h1 { font-size: 24px; margin-bottom: 8px; }

.pub { margin-top: 20px; padding: 20px 16px 24px; background: var(--tarjeta); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); scroll-margin-top: 56px; }
.pub-dia { font-size: 24px; }
.pub-estado { margin: 6px 0 16px; padding: 10px 12px; border-radius: 6px; font-weight: 600; }
.estado-pendiente { background: var(--fondo); color: var(--suave); }
.estado-ok { background: var(--verde-claro); color: var(--verde-oscuro); }
.estado-no { background: var(--rojo-claro); color: var(--rojo); }
.versiones { display: grid; gap: 22px; }

.version { border: 2px solid var(--linea); border-radius: 10px; padding: 12px; background: var(--tarjeta); transition: opacity .2s, border-color .2s; }
.version-aprobada { border-color: var(--verde); box-shadow: 0 0 0 3px var(--verde-claro); }
.version-atenuada { opacity: .62; }
.version-atenuada:focus-within, .version-atenuada:hover { opacity: 1; }
.version-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.version-cab h3 { font-size: 21px; }
.recomendada { font-size: 16px; font-weight: 700; color: var(--verde-oscuro); background: var(--verde-claro); padding: 3px 8px; border-radius: 4px; }
.sello { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; margin: 12px 0 0; border-radius: var(--radio); background: var(--verde-claro); color: var(--verde-oscuro); font-size: 21px; font-weight: 800; }
.form-aprobar { margin-top: 12px; }

/* ——— simulación de Instagram en el iPhone ———
   Letra del sistema (SF Pro en iOS), 14 px para nombres y textos, 12 px gris para los datos, iconos de línea de 24 px. */
.versiones { margin: 0 -10px; }
.version { padding: 12px 0 14px; overflow: hidden; }
.version-cab, .version-formato, .version .form-aprobar, .version .sello, .version .ig-deslizar { margin-left: 12px; margin-right: 12px; }
.version-formato { margin-top: -4px; margin-bottom: 10px; color: var(--suave); font-size: 16px; }
.ig {
  --ig-texto: #000; --ig-gris: #737373; --ig-linea: #dbdbdb; --ig-azul: #0095f6;
  background: #fff; color: var(--ig-texto);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 18px; letter-spacing: -.01em;
  border-top: 1px solid var(--ig-linea); border-bottom: 1px solid var(--ig-linea);
  -webkit-font-smoothing: antialiased;
}
.ig p { margin: 0; }
.ig strong, .ig .ig-nombre { font-weight: 600; }
.ig-ico { display: block; flex: none; }

/* barra de la app (una vez por lote) */
.ig-app-barra + .pub { margin-top: 0; }
.ig-app-barra {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; margin-top: 16px; padding: 0 16px 0 14px;
  background: #fff; color: #000; border-top: 1px solid var(--linea); border-bottom: 1px solid #efefef;
}
.ig-logo { display: block; width: auto; height: 34px; margin-top: 6px; }
.ig-app-iconos { display: flex; gap: 22px; }

/* avatar con el aro de historia */
.ig-avatar {
  width: var(--t, 32px); height: var(--t, 32px); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; background: #26282b; color: #fff;
  font-size: calc(var(--t, 32px) * .45); font-weight: 700; line-height: 1;
}
.a26 { --t: 26px; }
.a32 { --t: 32px; }
.ig-avatar.con-foto { background: #efefef; }
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-aro {
  flex: none; display: grid; place-items: center; padding: 2px; border-radius: 50%;
  padding: 2px; background: linear-gradient(45deg, #feda75 5%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 95%);
}
.ig-aro .ig-avatar { border: 2px solid #fff; box-sizing: content-box; }

/* publicación: cabecera */
.ig-cab { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 6px 0 12px; }
.ig-quien { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1; }
.ig-quien .ig-nombre { font-size: 14px; line-height: 18px; }
.ig-lugar { font-size: 12px; line-height: 15px; color: var(--ig-texto); }
.ig-cab-mas { padding: 8px; }

/* medio a su proporción real */
.ig-caja { position: relative; }
.ig-medio, .ig-carrusel { background: #000; overflow: hidden; }
.r45 { aspect-ratio: 4 / 5; }
.r11 { aspect-ratio: 1 / 1; }
/* 9:16 (reels y stories): siempre a todo el ancho; si no cabe en la pantalla, se recorta arriba y abajo */
.r916 { aspect-ratio: 9 / 16; width: 100%; max-height: 88vh; max-height: 88svh; }
.r191 { aspect-ratio: 1.91 / 1; }
.ig-medio img, .ig-medio video, .ig-diapo img, .ig-diapo video { width: 100%; height: 100%; object-fit: cover; }
.ig-medio video, .ig-diapo video { object-fit: contain; background: #000; }
.r916 video { object-fit: cover; }
.ig-carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.ig-carrusel::-webkit-scrollbar { display: none; }
.ig-diapo { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.ig-contador {
  position: absolute; z-index: 2; top: 14px; right: 14px; padding: 3px 8px; border-radius: 13px;
  background: rgba(18, 18, 18, .7); color: #fff; font-size: 12px; line-height: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums; pointer-events: none;
}

/* fila de iconos */
.ig-acciones { position: relative; display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 12px 0 14px; }
.ig-acc-izq { display: flex; gap: 16px; }
.ig-puntos { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.ig-punto { width: 6px; height: 6px; border-radius: 50%; background: #a8a8a8; transition: background .15s; }
.ig-punto.activo { background: var(--ig-azul); }
.ig-pie { padding: 0 14px 14px; display: grid; gap: 5px; }
.ig-gustas { font-size: 14px; }
.ig-texto { font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.ig-etiqueta { color: #00376b; }
.ig-comentarios { color: var(--ig-gris); }
.ig-fecha { color: var(--ig-gris); font-size: 12px; line-height: 16px; }
.ig-deslizar { margin-top: 8px; margin-bottom: 0; font-size: 15px; color: var(--suave); text-align: center; }
.medio-borrado { padding: 40px 12px; text-align: center; color: #ddd; font-size: 16px; }

/* vídeo: tocar para reproducir, botón de sonido */
.ig video[data-ig] { cursor: pointer; }
.ig-play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  z-index: 2; display: none; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff;
  pointer-events: none; padding-left: 5px;
}
.en-pausa .ig-play { display: grid; }
.ig-sonido {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(38, 38, 38, .8); color: #fff; cursor: pointer;
}
.ig-sonido .sin-sonido, .silenciado .ig-sonido .con-sonido { display: none; }
.silenciado .ig-sonido .sin-sonido { display: block; }

/* reel */
.ig-reel, .ig-story { border: 0; }
.ig-reel-pantalla, .ig-story-pantalla { position: relative; background: #000; color: #fff; overflow: hidden; }
.ig-degradado {
  position: absolute; inset: auto 0 0 0; height: 42%; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55));
}
.ig-reel-titulo {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 30px; font-size: 22px; line-height: 26px; font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)); pointer-events: none;
}
.ig-reel .ig-sonido { top: 56px; bottom: auto; right: 14px; }
.ig-reel-lado {
  position: absolute; right: 8px; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  pointer-events: none; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .35));
}
.ig-reel-lado > span { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 40px; }
.ig-reel-lado small { font-size: 12px; line-height: 14px; font-weight: 500; }
.ig-reel-disco .ig-avatar { border-radius: 6px; border: 2px solid #fff; }
.ig-reel-info { position: absolute; left: 14px; right: 66px; bottom: 16px; display: grid; gap: 10px; pointer-events: none; text-shadow: 0 0 2px rgba(0, 0, 0, .3); }
.ig-reel-quien { display: flex; align-items: center; gap: 10px; }
.ig-reel-quien .ig-nombre { font-size: 14px; }
.ig-seguir { padding: 4px 11px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 8px; font-size: 14px; line-height: 18px; font-weight: 600; }
.ig-reel-texto { font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.ig-reel-texto .ig-etiqueta { color: #fff; font-weight: 600; }
.ig-mas { color: rgba(255, 255, 255, .8); }
.ig-reel-audio { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; }
.ig-pie-completo { padding: 12px 14px 14px; background: #fff; }
.ig-pie-titulo { font-size: 12px; line-height: 16px; color: var(--ig-gris); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* historia (story) */
.ig-story-pantalla { border-radius: 10px; margin: 0 6px; }
.ig-story .ig-pie-completo { border-top: 0; }
.ig-story-sombra {
  position: absolute; inset: 0 0 auto 0; height: 110px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
}
.ig-story-arriba { position: absolute; top: 0; left: 0; right: 0; padding: 8px 8px 0; pointer-events: none; }
.ig-story-barras { display: flex; gap: 4px; }
.ig-story-barra { flex: 1; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.ig-story-progreso { display: block; width: 35%; height: 100%; background: #fff; }
.ig-story-cab { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-left: 4px; }
.ig-story-cab .ig-nombre { font-size: 14px; text-shadow: 0 0 2px rgba(0, 0, 0, .3); }
.ig-story-hora { font-size: 14px; color: rgba(255, 255, 255, .75); }
.ig-story-der { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ig-story .ig-sonido { top: 56px; bottom: auto; right: 12px; }
.ig-story-abajo {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 18px;
  padding: 10px 14px 14px; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
}
.ig-story-mensaje {
  flex: 1; height: 44px; display: flex; align-items: center; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .75); border-radius: 22px; font-size: 14px;
}

/* no me convence */
.rechazo { margin-top: 24px; }
.rechazo[open] > .boton-no { background: var(--rojo-claro); }
.form-rechazo { margin-top: 12px; padding: 16px 14px; border: 2px solid var(--rojo); border-radius: 10px; background: #fff; }
.rechazo-intro { margin: 0 0 14px; font-weight: 600; }
.grabadora { display: grid; gap: 12px; margin-bottom: 16px; }
.grabando { display: grid; gap: 10px; }
.grabando-tiempo { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.punto-rojo { width: 16px; height: 16px; border-radius: 50%; background: var(--rojo); animation: latido 1s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .punto-rojo { animation: none; } }
.grabado { display: grid; gap: 10px; }
.grabado-texto { margin: 0; font-weight: 600; }
.grabado audio { display: none; }
.reproductor { display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px solid var(--linea); border-radius: 10px; background: var(--fondo); }
.boton-play { flex: none; width: 68px; height: 68px; border: 0; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; cursor: pointer; }
.boton-play:active { background: var(--verde-oscuro); }
.boton-play:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }
.reproductor-barra { flex: 1; min-width: 0; display: grid; gap: 4px; }
.reproductor-posicion { width: 100%; height: 36px; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--verde); }
.reproductor-tiempo { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aviso-micro { margin: 0; padding: 12px; background: var(--ambar-claro); color: #5c3c00; border-radius: 6px; }
.rechazo-etiqueta { display: block; margin-bottom: 6px; color: var(--suave); font-size: 17px; }
textarea, input { width: 100%; padding: 12px; border: 2px solid var(--linea); border-radius: 6px; font: inherit; font-size: 19px; background: #fff; color: var(--texto); }
textarea { resize: vertical; min-height: 96px; }
.error-envio { margin: 12px 0 0; padding: 12px; background: var(--rojo-claro); color: var(--rojo); border-radius: 6px; font-weight: 600; }
.aviso-vivo { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 600px; padding: 14px 16px; border-radius: 8px; background: var(--texto); color: #fff; font-weight: 600; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.aviso-vivo.visible { opacity: 1; }

/* ——— panel ——— */
.pantalla-panel { font-size: 17px; }
.panel-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1100px; }
.panel-nav nav { display: flex; gap: 18px; align-items: center; }
.panel-nav nav form { margin: 0; }
.enlace-boton { border: 0; background: none; color: var(--verde-oscuro); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.panel { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.panel h1 { font-size: 28px; margin-bottom: 14px; }
.panel .boton { width: auto; min-height: 48px; font-size: 18px; }
.lista-lotes, .lista-clientes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lote-fila a { display: grid; gap: 2px; padding: 14px 16px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 8px; color: var(--texto); text-decoration: none; }
.lote-fila span { color: var(--suave); font-size: 16px; }
.estado-lote-abierto a { border-left: 5px solid var(--verde); }
.estado-lote-borrador a { border-left: 5px solid var(--ambar); }
.lista-clientes li { padding: 16px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 8px; display: grid; gap: 8px; }
.lista-clientes h2 small, .panel-pub h2 small { color: var(--suave); font-weight: 400; font-size: 15px; }
.enlace-cliente { margin: 0; overflow-wrap: anywhere; }
.miga { margin: 0 0 8px; }
.lote-datos { color: var(--suave); margin: 0 0 16px; }
.panel-pub { margin-top: 18px; padding: 16px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 8px; }
.panel-pub .pub-estado { display: inline-block; margin: 8px 0 12px; }
.estado-aprobada { background: var(--verde-claro); color: var(--verde-oscuro); }
.estado-rechazada { background: var(--rojo-claro); color: var(--rojo); }
.estado-sin_contestar { background: var(--fondo); color: var(--suave); }
.estado-por_defecto { background: var(--ambar-claro); color: var(--ambar); }
.panel-versiones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.panel-version { border: 2px solid var(--linea); border-radius: 8px; padding: 10px; }
.panel-version h3 { font-size: 17px; margin-bottom: 8px; }
.miniaturas { display: flex; gap: 6px; overflow-x: auto; }
.miniaturas img, .miniaturas video { height: 160px; width: auto; border-radius: 4px; background: #111; }
.panel-texto { font-size: 15px; color: var(--suave); margin: 8px 0 0; }
.panel-rechazo { margin-top: 14px; padding: 12px; border-left: 5px solid var(--rojo); background: var(--rojo-claro); border-radius: 4px; }
.panel-rechazo h3 { font-size: 17px; margin-bottom: 6px; }
.panel-rechazo p { margin: 6px 0; }
.panel-rechazo audio { width: 100%; max-width: 420px; }
.transcripcion { font-weight: 600; }
.panel-dato { color: var(--suave); font-size: 15px; }
.entrar { max-width: 380px; margin: 60px auto; padding: 0 16px; }
.entrar h1 { font-size: 30px; margin-bottom: 16px; }
.form-entrar { display: grid; gap: 8px; }
.form-entrar .boton { margin-top: 12px; }

@media (min-width: 700px) {
  .pub { border: 1px solid var(--linea); border-radius: 10px; }
}
.panel-version.version-aprobada { border-color: var(--verde); }

/* Al reproducir, el vídeo se ve limpio: fuera iconos, nombre, textos y degradados. Al pausar vuelven. */
.ig-degradado, .ig-reel-titulo, .ig-reel-lado, .ig-reel-info, .ig-story-sombra, .ig-story-arriba, .ig-story-abajo, .ig-sonido { transition: opacity .2s; }
.ig-reel-pantalla:not(.en-pausa) :is(.ig-degradado, .ig-reel-titulo, .ig-reel-lado, .ig-reel-info, .ig-sonido),
.ig-story-pantalla:not(.en-pausa) :is(.ig-story-sombra, .ig-story-arriba, .ig-story-abajo, .ig-sonido),
.ig-caja:not(.en-pausa) .ig-sonido { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ig-degradado, .ig-reel-titulo, .ig-reel-lado, .ig-reel-info, .ig-story-sombra, .ig-story-arriba, .ig-story-abajo, .ig-sonido { transition: none; } }
