/* Mirrors grok_fluid_level_sensor receiver/display dashboard look */
.cloud-shell { max-width: 720px; margin: 0 auto; }
.devices-shell { max-width: none; }
.devices-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
nav.device-side {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.2rem;
  background: #1e2937;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 0.75rem 0.6rem;
  position: sticky;
  top: 4.75rem;
}
nav.device-side h2 {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 0.45rem 0.45rem;
}
nav.device-side a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #e5e7eb;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 0;
  margin: 0;
}
nav.device-side a:hover { background: #334155; text-decoration: none; }
nav.device-side a.active { background: #0ea5e9; color: #fff; }
.trigger-help { margin: 0 0 0.45rem; font-size: 0.82rem; }
.trigger-slots {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.trigger-slot {
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: #0f172a;
}
.trigger-slot.empty {
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
}
.trigger-row {
  display: grid;
  grid-template-columns: 1.4rem 6.2rem 4.2rem minmax(7rem, 1fr) auto auto;
  gap: 0.35rem 0.4rem;
  align-items: end;
  max-width: none;
  margin: 0;
}
.trigger-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  padding-bottom: 0.45rem;
}
.trigger-row .field {
  display: grid;
  gap: 0.12rem;
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0;
}
.trigger-slot input,
.trigger-slot select,
.trigger-slot button {
  width: 100%;
  padding: 0.32rem 0.45rem;
  min-height: 34px;
  font-size: 0.85rem;
  border-radius: 6px;
}
.trigger-slot button {
  width: auto;
  padding: 0.32rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.trigger-slot .btn-primary { width: auto; max-width: none; }
.devices-main { min-width: 0; }
.chart-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.chart-tiles.multi { grid-template-columns: 1fr; }
.chart-latest { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; }
.device-latest { margin: 0 0 0.85rem; }
.device-name-block { max-width: 22rem; }
.device-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.device-name-block input[name="name"] {
  width: 20ch;
  max-width: 100%;
  flex: 0 0 20ch;
}
.device-name-block .device-hw-id {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
}
.device-name-block button {
  width: auto;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}
.device-name-block .device-fw {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}
.device-ota-form { margin: 0.35rem 0 0.6rem; }
.device-ota-form button { width: auto; }
@media (min-width: 900px) {
  .chart-tiles.multi { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .devices-layout { grid-template-columns: 1fr; }
  nav.device-side { position: static; }
  .trigger-row {
    grid-template-columns: 1.4rem 1fr 4.2rem;
  }
  .trigger-row .field.emails { grid-column: 1 / -1; }
  .trigger-slot button { grid-column: span 1; }
}
.cloud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #1e2937;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.cloud-brand { display: flex; align-items: center; gap: 10px; }
.cloud-brand-name { font-weight: 700; font-size: 18px; color: #f1f5f9; }
.cloud-brand-sub { font-size: 11px; color: #94a3b8; }
.cloud-header-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.cloud-btn {
  background: #0ea5e9;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.cloud-btn.ghost { background: #334155; }
.cloud-btn:hover { text-decoration: none; filter: brightness(1.05); }
.cloud-dashboard { max-width: 620px; margin: 0 auto; }
.cloud-banner {
  background: #422006;
  color: #fde68a;
  border: 1px solid #854d0e;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.cloud-hero {
  background: #1e2937;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.cloud-hero-label { font-size: 12px; color: #64748b; letter-spacing: 0.5px; }
.cloud-hero-value { font-size: 56px; font-weight: 800; line-height: 1; color: #f1f5f9; }
.cloud-hero-status { font-size: 14px; color: #22c55e; margin-top: 6px; }
.cloud-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.cloud-status-card {
  background: #1e2937;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
}
.cloud-status-label { font-size: 11px; color: #94a3b8; }
.cloud-status-value { font-size: 14px; font-weight: 600; color: #f1f5f9; }
.cloud-cta.cardish {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1rem;
}
.cloud-cta h2 { margin-top: 0; font-size: 1.1rem; }
.device-picker { margin-bottom: 12px; max-width: 28rem; }
.chart-card .chart-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.chart-card .chart-head h2 { margin: 0; font-size: 1.05rem; }
.chart-meta { text-align: right; }
.chart-updated { display: block; font-size: 0.75rem; margin-top: 0.15rem; }
.chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 0.75rem;
}
.device-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
}
@media (max-width: 560px) {
  .cloud-hero-value { font-size: 44px; }
  .chart-wrap { height: 220px; }
}
