/* Informes de ejemplo con registro (cumplimiento.html). Usa las variables --ck-* de la web. */
.lm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
}

.lm-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.lm-paper {
  position: relative;
  height: 250px;
  overflow: hidden;
  padding: 20px 20px 0;
  border: 1px solid var(--ck-vl2);
  border-radius: 12px;
  background: var(--ck-card);
  box-shadow: 0 24px 48px -34px rgb(6 19 42 / 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.lm-card:hover .lm-paper,
.lm-card:focus-within .lm-paper {
  transform: translateY(-3px);
  box-shadow: 0 30px 56px -30px rgb(6 19 42 / 0.5);
}

.lm-paper__tag {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ck-mute);
}

.lm-paper__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.lm-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.lm-big b {
  font-size: 2.4rem;
  line-height: 1;
}

.lm-big span {
  font-size: 0.82rem;
  color: var(--ck-mute);
}

.lm-line {
  display: block;
  height: 8px;
  margin: 9px 0;
  border-radius: 4px;
  background: var(--ck-vl2);
}

.lm-line--s {
  width: 62%;
}

.lm-line--m {
  width: 82%;
}

.lm-row {
  margin: 0 0 7px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.lm-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 70px;
  margin: 6px 0 12px;
}

.lm-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--ck-accent-ink, #3c5bd9);
  opacity: 0.85;
}

/* El tramo de abajo se difumina: se ve que hay más, pero no se lee. */
.lm-lock {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 46%;
  padding-bottom: 14px;
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 0),
    var(--ck-card) 62%
  );
  backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%);
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
}

.lm-lock span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--ck-vl2);
  border-radius: 999px;
  background: var(--ck-card);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ck-mute);
}

.lm-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.lm-card p.lm-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ck-mute);
}

.lm-card .ck-btn {
  align-self: flex-start;
  cursor: pointer;
}

.lm-note {
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--ck-mute);
}

/* Barra fija que aparece al bajar de la portada */
.lm-sticky {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: #0d1530;
  color: #fff;
  box-shadow: 0 18px 40px -16px rgb(6 19 42 / 0.6);
  transform: translateY(140%);
  transition: transform 0.3s ease;
}

.lm-sticky.is-on {
  transform: translateY(0);
}

.lm-sticky p {
  margin: 0;
  font-size: 0.92rem;
}

.lm-sticky__x {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.lm-sticky__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 560px) {
  .lm-sticky p {
    display: none;
  }
  .lm-sticky {
    justify-content: center;
  }
}

/* Ventana del formulario */
.lm-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--ck-vl2);
  border-radius: 16px;
  background: var(--ck-card);
  color: inherit;
  box-shadow: 0 40px 90px -30px rgb(6 19 42 / 0.6);
}

.lm-dialog::backdrop {
  background: rgb(6 12 30 / 0.6);
  backdrop-filter: blur(3px);
}

.lm-dialog__in {
  position: relative;
  padding: 30px 28px 26px;
}

.lm-dialog h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.lm-dialog .lm-sub {
  margin: 0 0 18px;
  font-size: 0.93rem;
  color: var(--ck-mute);
}

.lm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.2rem;
  color: var(--ck-mute);
  cursor: pointer;
}

.lm-form {
  display: grid;
  gap: 12px;
}

.lm-form label.lm-f {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 600;
}

.lm-form input:not([type='checkbox']),
.lm-form select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--ck-vl2);
  border-radius: 8px;
  background: var(--ck-card);
  color: inherit;
  font: inherit;
  font-weight: 400;
}

.lm-form .lm-chk {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ck-mute);
}

.lm-form .lm-chk input {
  margin-top: 3px;
}

.lm-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lm-status {
  margin: 0;
  font-size: 0.85rem;
}

.lm-done {
  text-align: center;
}

.lm-done h2 {
  margin-top: 6px;
}

.lm-done .ck-btn {
  margin-top: 8px;
}

/* Visor con pestañas: una muestra a la vez y un solo botón */
.lm-viewer {
  display: grid;
  grid-template-columns: minmax(200px, 270px) 1fr;
  gap: 28px;
  margin-top: 36px;
  align-items: start;
}

.lm-tabs {
  display: grid;
  gap: 8px;
}

.lm-tab {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: baseline;
  padding: 12px 16px;
  border: 1px solid var(--ck-vl2);
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.lm-tab:hover {
  border-color: var(--ck-accent-ink);
}

.lm-tab.is-on {
  background: var(--ck-card);
  border-color: var(--ck-accent-ink);
}

.lm-tab__n {
  grid-row: 1 / 3;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ck-mute);
}

.lm-tab.is-on .lm-tab__n {
  color: var(--ck-accent-ink);
}

.lm-tab__t {
  font-weight: 700;
}

.lm-tab__d {
  font-size: 0.82rem;
  color: var(--ck-mute);
}

.lm-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--ck-vl2);
  border-radius: 20px;
  background: var(--ck-card);
}

.lm-story__k {
  margin: 0 0 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ck-accent-ink);
}

.lm-story h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.lm-story > p:not(.lm-story__k):not(.lm-note) {
  margin: 0 0 20px;
  color: var(--ck-mute);
  line-height: 1.55;
}

.lm-story .ck-btn {
  max-width: 100%;
  padding-inline: 22px;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
}

.lm-story .lm-note {
  margin-top: 12px;
}

.lm-note--end {
  margin-top: 18px;
}

.lm-sheets {
  position: relative;
  min-height: 300px;
}

.lm-paper--big {
  display: none;
  height: 300px;
  padding: 24px 24px 0;
  background: var(--ck-bg, var(--ck-card));
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  cursor: default;
}

.lm-paper--big.is-on {
  display: block;
  animation: lm-in 0.35s ease;
}

@keyframes lm-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lm-paper--big.is-on {
    animation: none;
  }
}

@media (max-width: 900px) {
  .lm-viewer {
    grid-template-columns: 1fr;
  }
  .lm-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .lm-tab {
    flex: none;
    grid-template-columns: 1fr;
  }
  .lm-tab__n,
  .lm-tab__d {
    display: none;
  }
  .lm-stage {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

/* Barra fija: una sola línea, botón compacto */
.lm-sticky {
  max-width: 820px;
  white-space: nowrap;
}

.lm-sticky p {
  white-space: normal;
  line-height: 1.35;
}

.lm-sticky .ck-btn {
  flex: none;
  padding: 10px 20px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.lm-sticky:not(.is-on) {
  pointer-events: none;
}
