/* ============================================================================
   DEMO · ops · estilos específicos de la escena "Run it all from one place"
   Browser frame claro estilo software premium: barra con puntitos, sidebar
   angosta de iconos, tablero kanban de 3 columnas.
   r10 (1-sep, Cesar): el acento de esta escena era ÁMBAR, y ámbar es el dueño
   de la Specialty 03. Pero el slide 06 es "2.3 Custom Software", o sea
   Specialty 02: repetía el color del slide 07 y rompía la lectura de grupos.
   Ahora el acento es TEAL, el de su propio grupo. Colores SIEMPRE por tokens.
   ========================================================================== */

.demo--ops .demo__cluster { width: min(37rem, 100%); padding: 1.2rem 1rem 1.8rem; }

/* ---- browser frame ---------------------------------------------------------- */
.demo--ops .dm-browser {
  width: min(560px, 100%);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.55s var(--ease-scene);
}
.demo--ops .dm-browser.is-on { opacity: 1; transform: none; }

.demo--ops .dm-browser__bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}
.demo--ops .dm-browser__dots { display: flex; gap: 0.32rem; }
.demo--ops .dm-browser__dots i { width: 8px; height: 8px; border-radius: 50%; }
/* r10: los tres puntitos van SIEMPRE en el mismo orden en todas las escenas
   (violeta, teal, ámbar). Así se leen como cromo de marca, no como acento. */
.demo--ops .dm-browser__dots i:nth-child(1) { background: var(--violet); }
.demo--ops .dm-browser__dots i:nth-child(2) { background: var(--teal); }
.demo--ops .dm-browser__dots i:nth-child(3) { background: var(--amber); }
.demo--ops .dm-browser__url {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
}

.demo--ops .dm-browser__body { display: grid; grid-template-columns: 44px minmax(0, 1fr); }

/* ---- sidebar ---------------------------------------------------------------- */
.demo--ops .dm-side {
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0;
}
.demo--ops .dm-side i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
}
.demo--ops .dm-side i svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.demo--ops .dm-side i.is-active { background: var(--teal-light); color: var(--teal); }

/* ---- área principal --------------------------------------------------------- */
.demo--ops .dm-main { padding: 0.65rem 0.75rem 0.85rem; display: grid; gap: 0.6rem; }
.demo--ops .dm-main__top { display: flex; align-items: center; gap: 0.6rem; min-height: 40px; }
.demo--ops .dm-ops-title { display: grid; line-height: 1.25; min-width: 0; }
.demo--ops .dm-ops-title b {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo--ops .dm-ops-title small {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* chip de stat "Today": entra cuando el guion lo pide, reserva su espacio */
.demo--ops .dm-stat {
  margin-left: auto;
  background: var(--slate);
  color: #fff;
  border-radius: 12px;
  padding: 0.32rem 0.65rem 0.38rem;
  display: grid;
  justify-items: end;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(-6px) scale(0.94);
  transition: opacity 0.32s var(--ease-out), transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.demo--ops .dm-stat.is-on { opacity: 1; transform: none; }
.demo--ops .dm-stat small {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.demo--ops .dm-stat__row { display: flex; align-items: baseline; gap: 0.3rem; }
.demo--ops .dm-stat b {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--teal-bright);
}
.demo--ops .dm-stat__row span { font-size: 0.58rem; color: rgba(255, 255, 255, 0.75); white-space: nowrap; }

/* ---- tablero kanban --------------------------------------------------------- */
.demo--ops .dm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.demo--ops .dm-col {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-height: 180px;
}
.demo--ops .dm-col__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 560;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.1rem 0.15rem;
  white-space: nowrap;
  min-width: 0;
}
.demo--ops .dm-count {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  /* r10: NEW se distingue por INTENSIDAD, no por otro tono: relleno teal
     sólido contra el mismo teal al 14% de las otras dos columnas. */
  background: var(--teal);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.54rem;
}
.demo--ops .dm-col--sched .dm-count,
.demo--ops .dm-col--done .dm-count {
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  color: var(--teal);
}
.demo--ops .dm-count.is-pop { animation: dm-ops-pop 0.32s var(--ease-out); }
@keyframes dm-ops-pop { 40% { transform: scale(1.3); } }

/* ---- lead cards ------------------------------------------------------------- */
.demo--ops .dm-lead {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  padding: 0.4rem 0.5rem 0.45rem;
  display: grid;
  gap: 0.12rem;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.38s var(--ease-scene),
    border-color 0.3s var(--ease),
    box-shadow 0.25s var(--ease);
}
.demo--ops .dm-lead.is-on { opacity: 1; transform: none; }
.demo--ops .dm-lead__row { display: flex; align-items: baseline; gap: 0.3rem; min-width: 0; }
.demo--ops .dm-lead__row b {
  font-size: 0.64rem;
  font-weight: 620;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo--ops .dm-lead__amt {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--teal);
}
.demo--ops .dm-lead small {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo--ops .dm-lead.is-grabbed {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(17, 17, 16, 0.16);
  z-index: 4;
}
.demo--ops .dm-lead.is-flying {
  z-index: 5;
  box-shadow: 0 16px 30px rgba(17, 17, 16, 0.2);
  animation: dm-ops-fly 0.7s var(--ease-scene) forwards;
}
.demo--ops .dm-lead--sched { border-left-color: var(--teal); }
.demo--ops .dm-lead--sched .dm-lead__amt { color: var(--teal); }

/* vuelo del drag: sube un poco a mitad de camino, curva y asiento final */
@keyframes dm-ops-fly {
  0% { transform: translate(0, 0) scale(1.05); }
  35% { transform: translate(calc(var(--fx) * 0.4), calc(var(--fy) * 0.18 - 10px)) scale(1.07) rotate(2deg); }
  100% { transform: translate(var(--fx), var(--fy)) scale(1); }
}

/* ---- hueco de drop en Scheduled --------------------------------------------- */
.demo--ops .dm-slot {
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  min-height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.demo--ops .dm-slot.is-hot {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 8%, transparent);
  color: var(--teal);
}

/* ---- trabajos terminados ----------------------------------------------------- */
.demo--ops .dm-done {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: color-mix(in srgb, var(--paper-raised) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.38rem 0.45rem;
  font-size: 0.56rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-scene);
}
.demo--ops .dm-done.is-on { opacity: 0.85; transform: none; }
.demo--ops .dm-done i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--teal) 16%, transparent);
  color: var(--teal);
  display: grid;
  place-items: center;
  flex: none;
}
.demo--ops .dm-done i svg {
  width: 8px; height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.demo--ops .dm-done b {
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- nota flotante ----------------------------------------------------------- */
.demo--ops .dm-note--week { bottom: -0.3rem; right: -0.4rem; }

/* ---- móvil -------------------------------------------------------------------- */
@media (max-width: 720px) {
  .demo--ops .demo__cluster { padding: 0.9rem 0.2rem 2rem; }
  .demo--ops .dm-browser__body { grid-template-columns: 34px minmax(0, 1fr); }
  .demo--ops .dm-main { padding: 0.55rem 0.5rem 0.65rem; }
  .demo--ops .dm-board { gap: 0.35rem; }
  .demo--ops .dm-col { padding: 0.35rem; min-height: 196px; }
  .demo--ops .dm-col__head { font-size: 0.46rem; letter-spacing: 0.06em; }
  /* en columnas angostas el nombre manda: monto y trabajo bajan de línea */
  .demo--ops .dm-lead__row { flex-wrap: wrap; row-gap: 0.08rem; }
  .demo--ops .dm-lead__row b { flex: 1 1 100%; font-size: 0.55rem; }
  .demo--ops .dm-lead__amt { margin-left: 0; }
  .demo--ops .dm-lead small { font-size: 0.46rem; }
  .demo--ops .dm-done { font-size: 0.5rem; }
  .demo--ops .dm-ops-title b { font-size: 0.72rem; }
  .demo--ops .dm-note--week { bottom: -1.2rem; right: -0.1rem; }
}

/* r2 QA: las pills de DONE no pueden desbordar su columna (mobile).
   El overflow:hidden va SOLO en la columna done: en las otras dos clipearia
   la card que vuela de New a Scheduled durante el drag. */
.demo--ops .dm-col { min-width: 0; }
.demo--ops .dm-col--done { overflow: hidden; }
.demo--ops .dm-done { min-width: 0; max-width: 100%; }
