/* Layout: grilla, barra superior y contenido (DISENO.md R1, R2, R9, R11). La barra lateral está en lateral.css. */

/* --- Grilla: columna del menú lateral + principal --------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--ancho-lateral) minmax(0, 1fr);
  min-height: 100vh;
}

.app.sin-sesion {
  grid-template-columns: minmax(0, 1fr);
}

.principal {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.barra {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--borde);
  background: var(--tarjeta);
}

.barra h1 {
  flex: 1;
  margin: 0;
  font-size: 1.35rem;
}

.barra .menu {
  display: none;
}

.barra .acciones:empty {
  display: none;
}

.marca-sola {
  margin: 0;
  font-weight: 700;
}

.contenido {
  width: 100%;
  max-width: 1400px;
  padding: 1.5rem;
}

.sin-sesion .contenido {
  max-width: 28rem;
  margin: 8vh auto 0;
}

/* --- Celular y tablet chica (R1, R2, R9) ----------------------------------- */

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .barra {
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 0;
    background: var(--azul);
    color: #fff;
  }

  .barra h1,
  .barra .marca-sola {
    color: #fff;
    font-size: 1.1rem;
  }

  .barra .menu {
    display: inline-flex;
    color: #fff;
  }

  .barra h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .barra .acciones .texto {
    display: none;
  }

  .contenido {
    padding: 1rem;
  }
}

@media print {
  .lateral,
  .barra,
  .no-imprimir,
  .mensaje {
    display: none !important;
  }

  .app {
    display: block;
  }

  body {
    background: #fff;
  }
}
