/* Campus Industrial TV · Control de pantallas · vista compacta */

/* Cabecera más baja para dejar sitio a las 11 pantallas */
#app.wrap {
  max-width: 1600px;
  padding-top: 24px;
  padding-bottom: 24px;
}

#app .top {
  gap: 20px;
  margin-bottom: 12px;
  align-items: end;
}

#app .top h1 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: .92;
  margin: 4px 0 8px;
}

#app .top .lead {
  margin: 0;
  font-size: .95rem;
}

#app .userbox {
  gap: 8px;
}

.control-message {
  min-height: 1.2em;
  margin: 4px 0 12px;
  font-size: .9rem;
}

/* 4 columnas en escritorio: hasta 12 pantallas visibles en 3 filas */
#screensGrid.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.screen-card {
  position: relative;
  min-width: 0;
  padding: 16px !important;
  border-radius: 18px !important;
}

.screen-card h2 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.screen-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  line-height: 1.2;
  opacity: .48;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-meta {
  display: grid;
  gap: 3px;
  margin: 10px 0 11px;
}

.screen-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: .82rem;
  line-height: 1.2;
}

.screen-label {
  opacity: .66;
  white-space: nowrap;
}

.screen-value {
  min-width: 0;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #777;
  margin-right: 5px;
  vertical-align: 1px;
}

.status-dot.ok { background: #29c46d; }
.status-dot.bad { background: #e55353; }
.status-dot.warn { background: #d8a321; }

.restart-btn {
  width: auto;
  min-height: 0;
  padding: 8px 12px !important;
  font-size: .78rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
}

.restart-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.command-note {
  min-height: 1em;
  margin-top: 7px;
  font-size: .7rem;
  line-height: 1.2;
  opacity: .67;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-card { grid-column: 1 / -1; }

/* Portátiles */
@media (max-width: 1180px) {
  #screensGrid.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tablet */
@media (max-width: 850px) {
  #screensGrid.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #app .top { align-items: start; }
}

/* Móvil */
@media (max-width: 560px) {
  #screensGrid.grid { grid-template-columns: 1fr; }
  #app.wrap { padding-top: 16px; }
  #app .top h1 { font-size: 2.2rem; }
}
