/* ============================================================================
   IotMonitor shared UI (served at _content/IotMonitor.Shared/css/iot.css).
   Single source of truth for the iot-* design system. Referenced by both the
   Blazor Web host and the MAUI Blazor Hybrid host. No external fonts/icons.
   ============================================================================ */

:root {
    --iot-bg: #f8fafc;
    --iot-surface: #ffffff;
    --iot-border: #e2e8f0;
    --iot-border-strong: #cbd5e1;
    --iot-ink: #0f172a;
    --iot-ink-soft: #334155;
    --iot-muted: #64748b;
    --iot-faint: #94a3b8;
    --iot-accent: #45284f;
    --iot-accent-ink: #331d3a;
    --iot-accent-soft: rgba(69, 40, 79, 0.12);
    --iot-danger: #b91c1c;
    --iot-danger-bg: #fee2e2;
    --iot-danger-border: #fecaca;
    --iot-temp: #8a0707;
    --iot-hum: #2563eb;
    --iot-chip-bg: #f1f5f9;
    --iot-radius: 10px;
    --iot-radius-sm: 8px;
    --iot-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --iot-shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Keep the body from ever scrolling sideways. */
html, body { overflow-x: hidden; }

/* ---- Page shell --------------------------------------------------------- */
.iot-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
    color: var(--iot-ink);
}

.iot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.iot-head h1 { font-size: 1.5rem; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.iot-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Text helpers ------------------------------------------------------- */
.iot-muted { color: var(--iot-muted); }
.iot-error { color: var(--iot-danger); }
.iot-over  { color: var(--iot-danger); }

/* ---- Buttons ------------------------------------------------------------ */
.iot-refresh {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: 1px solid var(--iot-border-strong); background: var(--iot-surface);
    border-radius: var(--iot-radius-sm); padding: 0.45rem 0.85rem;
    cursor: pointer; text-decoration: none; color: var(--iot-ink);
    font-size: 0.9rem; font-weight: 500; line-height: 1.2;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.iot-refresh:hover { background: #f8fafc; border-color: var(--iot-faint); }
.iot-refresh:disabled { opacity: 0.55; cursor: default; }

.iot-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: none; background: var(--iot-accent); color: #fff;
    border-radius: var(--iot-radius-sm); padding: 0.55rem 1.05rem;
    font-size: 0.95rem; font-weight: 600; line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: background-color .12s ease, box-shadow .12s ease;
}
.iot-btn:hover { background: var(--iot-accent-ink); }
.iot-btn:disabled { opacity: 0.55; cursor: default; }
.iot-btn:disabled:hover { background: var(--iot-accent); }

.iot-link-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    border: none; background: none; color: var(--iot-accent);
    cursor: pointer; font-size: 0.82rem; padding: 0.15rem 0.1rem;
}
.iot-link-btn:hover { color: var(--iot-accent-ink); text-decoration: underline; }
.iot-link-btn:disabled { opacity: 0.55; cursor: default; text-decoration: none; }

/* Inline SVG icon sizing. The icon inherits text colour via currentColor. */
.iot-ico {
    display: inline-block; width: 1em; height: 1em;
    flex: 0 0 auto; vertical-align: -0.125em;
}
.iot-refresh .iot-ico, .iot-btn .iot-ico, .iot-link-btn .iot-ico { width: 1.05em; height: 1.05em; }

/* Nav icon (host sidebar). Sits beside the link label, inherits link colour. */
.iot-nav-ico {
    display: inline-block; width: 1.2rem; height: 1.2rem;
    margin-right: 0.75rem; vertical-align: -0.2rem; flex: 0 0 auto;
}

/* ---- Cards grid --------------------------------------------------------- */
.iot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}

.iot-card {
    border: 1px solid var(--iot-border); border-radius: var(--iot-radius);
    padding: 1.1rem 1.15rem; background: var(--iot-surface);
    box-shadow: var(--iot-shadow);
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.iot-clickable { cursor: pointer; }
.iot-clickable:hover { border-color: var(--iot-faint); box-shadow: var(--iot-shadow-hover); transform: translateY(-1px); }

.iot-card-head { display: flex; align-items: flex-start; gap: 0.7rem; }
.iot-card-ico {
    flex: 0 0 auto; width: 2.5rem; height: 2.5rem; margin-top: 0.1rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; background: var(--iot-chip-bg); color: var(--iot-ink-soft);
}
.iot-card-ico .iot-ico { width: 1.5rem; height: 1.5rem; }
.iot-card-name { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.iot-card-sub { color: var(--iot-muted); font-size: 0.8rem; margin-top: 0.15rem; word-break: break-word; }
.iot-card-sub code { font-size: 0.75rem; background: var(--iot-chip-bg); border-radius: 4px; padding: 0.05rem 0.3rem; }
.iot-card-foot {
    font-size: 0.78rem; color: var(--iot-faint); margin-top: 0.7rem;
    padding-top: 0.6rem; border-top: 1px solid var(--iot-border);
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}

/* A card flagged over its target reads warm without shouting. */
.iot-card.iot-card-over { border-color: var(--iot-danger-border); box-shadow: 0 1px 2px rgba(185, 28, 28, 0.08); }

/* ---- Application tiles (Applications landing page) ---------------------- */
.iot-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.iot-app-tile {
    border: 1px solid var(--iot-border); border-radius: var(--iot-radius);
    background: var(--iot-surface); box-shadow: var(--iot-shadow);
    padding: 1.5rem 1.6rem;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.iot-app-tile:hover { border-color: var(--iot-faint); box-shadow: var(--iot-shadow-hover); transform: translateY(-1px); }

.iot-app-tile-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.iot-app-tile-ico {
    flex: 0 0 auto; width: 3.5rem; height: 3.5rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; background: var(--iot-accent-soft); color: var(--iot-accent);
}
.iot-app-tile-ico .iot-ico { width: 2rem; height: 2rem; }
.iot-app-tile-name { font-weight: 700; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }

/* Legacy single-value block (no longer rendered by Applications.razor; kept
   dormant in case any other markup still references it). */
.iot-app-tile-values { display: flex; flex-direction: column; gap: 0.5rem; }
.iot-app-tile-row {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
}
.iot-app-tile-row .iot-ico { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }
.iot-app-tile-row-temp { color: var(--iot-temp); }
.iot-app-tile-row-hum { color: var(--iot-hum); }
.iot-app-tile-val { min-width: 0; }

/* ---- Application tile — per-sensor row list ------------------------------ */
.iot-app-sensors {
    display: flex; flex-direction: column; gap: 0.3rem;
    border-top: 1px solid var(--iot-border); padding-top: 0.6rem;
}

.iot-app-sensor-row {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0;
}

.iot-app-sensor-ico { flex: 0 0 auto; display: inline-flex; color: var(--iot-muted); }
.iot-app-sensor-ico svg { width: 16px; height: 16px; display: block; }

.iot-app-sensor-name {
    font-size: 12pt; color: var(--iot-ink); line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.iot-app-sensor-temp,
.iot-app-sensor-hum {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 12px; font-weight: 600; line-height: 1.2;
    justify-self: end; white-space: nowrap;
}
.iot-app-sensor-temp svg,
.iot-app-sensor-hum svg { width: 16px; height: 16px; flex: 0 0 auto; }

.iot-app-sensor-temp { color: var(--iot-temp); }
.iot-app-sensor-hum { color: var(--iot-hum); }

.iot-app-sensor-more {
    align-self: flex-start;
    border: none; background: none; cursor: pointer;
    color: var(--iot-muted); font-size: 0.78rem; font-weight: 500;
    padding: 0.35rem 0 0.1rem; margin: 0;
    text-decoration: underline; text-decoration-color: transparent;
    transition: color .12s ease, text-decoration-color .12s ease;
}
.iot-app-sensor-more:hover { color: var(--iot-accent); text-decoration-color: currentColor; }

@media (max-width: 520px) {
    .iot-app-grid { grid-template-columns: 1fr; }
    .iot-app-sensor-row { grid-template-columns: 1.1rem minmax(0, 1fr) auto auto; gap: 0.4rem; }
    .iot-app-sensor-temp, .iot-app-sensor-hum { font-size: 11px; }
}

/* ---- Metric tiles ------------------------------------------------------- */
.iot-metrics { display: flex; gap: 1.25rem; margin: 0.95rem 0 0.4rem; flex-wrap: wrap; }
.iot-metric { display: flex; flex-direction: column; min-width: 0; }
.iot-val { font-size: 1.35rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.iot-lbl {
    font-size: 0.68rem; color: var(--iot-muted); text-transform: uppercase;
    letter-spacing: 0.04em; margin-top: 0.2rem;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.iot-lbl .iot-ico { width: 1.15rem; height: 1.15rem; color: var(--iot-faint); vertical-align: -0.2em; }

/* ---- Sections ----------------------------------------------------------- */
.iot-app { margin-bottom: 2rem; }
.iot-app h2 {
    font-size: 1.1rem; margin: 0 0 0.85rem;
    border-bottom: 1px solid var(--iot-border); padding-bottom: 0.4rem;
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.iot-app h3 { font-size: 0.95rem; margin: 1.1rem 0 0.5rem; color: var(--iot-ink-soft); }
.iot-kind {
    font-size: 0.72rem; color: var(--iot-muted); background: var(--iot-chip-bg);
    border-radius: 999px; padding: 0.12rem 0.55rem; font-weight: 500;
}

/* ---- Empty state -------------------------------------------------------- */
.iot-empty {
    border: 1px dashed var(--iot-border-strong); border-radius: var(--iot-radius);
    background: var(--iot-surface); padding: 2rem 1.5rem; text-align: center;
    color: var(--iot-muted); max-width: 520px; margin: 0.5rem auto;
}
.iot-empty .iot-ico { width: 2rem; height: 2rem; color: var(--iot-faint); margin-bottom: 0.5rem; }
.iot-empty p { margin: 0.25rem 0 0; font-size: 0.9rem; line-height: 1.45; }

/* ---- Lists -------------------------------------------------------------- */
.iot-list { list-style: none; padding: 0; margin: 0.25rem 0 0.75rem; }
.iot-list li {
    padding: 0.4rem 0; border-bottom: 1px solid var(--iot-chip-bg);
    display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap;
}
.iot-list li:last-child { border-bottom: none; }

/* ---- Rows & forms ------------------------------------------------------- */
.iot-row { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0; }
.iot-form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 460px; }
.iot-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--iot-ink-soft); font-weight: 500; }

.iot-input {
    padding: 0.5rem 0.65rem; border: 1px solid var(--iot-border-strong);
    border-radius: var(--iot-radius-sm); font-size: 0.95rem; color: var(--iot-ink);
    background: var(--iot-surface); box-sizing: border-box; max-width: 100%;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.iot-input:focus { outline: none; border-color: var(--iot-accent); box-shadow: 0 0 0 3px var(--iot-accent-soft); }
.iot-narrow { max-width: 140px; }

/* ---- Badges ------------------------------------------------------------- */
.iot-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.72rem; font-weight: 500;
    background: var(--iot-chip-bg); color: var(--iot-ink-soft);
    border-radius: 999px; padding: 0.15rem 0.55rem; white-space: nowrap;
}
.iot-badge .iot-ico { width: 0.85rem; height: 0.85rem; }
.iot-badge-warn { background: var(--iot-danger-bg); color: var(--iot-danger); font-weight: 600; }

/* ---- Sensor table (Sensors page) ---------------------------------------- */
.iot-sensor-table td { vertical-align: middle; }
.iot-row-sensor { display: flex; align-items: center; gap: 0.6rem; }
.iot-card-ico-sm {
    width: 2rem; height: 2rem; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--iot-chip-bg); color: var(--iot-ink-soft);
}
.iot-card-ico-sm .iot-ico { width: 1.2rem; height: 1.2rem; }
.iot-metrics-row { display: flex; gap: 1rem; margin: 0; flex-wrap: wrap; }
.iot-metrics-row .iot-val { font-size: 1rem; }

/* ---- Tables ------------------------------------------------------------- */
.iot-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -0.25rem; padding: 0 0.25rem; }
.iot-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.iot-table th, .iot-table td {
    text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--iot-chip-bg);
    vertical-align: middle;
}
.iot-table th { color: var(--iot-muted); font-weight: 600; white-space: nowrap; }
.iot-table tbody tr:hover { background: #fbfdff; }
.iot-table code { font-size: 0.78rem; background: var(--iot-chip-bg); border-radius: 4px; padding: 0.05rem 0.3rem; }

/* Compact variant: tighter rows/columns so wide editor tables fit without
   pushing the page width (used by the Metrics display-config table). */
.iot-table-compact { font-size: 0.78rem; }
.iot-table-compact th, .iot-table-compact td { padding: 0.3rem 0.4rem; }
.iot-table-compact th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; }
.iot-input-sm { padding: 0.3rem 0.45rem; font-size: 0.8rem; }
.iot-narrow-xs { max-width: 72px; }
.iot-btn-sm { padding: 0.32rem 0.6rem; font-size: 0.8rem; }
.iot-btn-sm .iot-ico { width: 0.9rem; height: 0.9rem; }

/* ---- Save confirmation -------------------------------------------------- */
.iot-saved { display: inline-flex; align-items: center; gap: 0.3rem; color: #15803d; font-size: 0.85rem; font-weight: 500; }
.iot-saved .iot-ico { width: 0.95rem; height: 0.95rem; }

/* ---- Login -------------------------------------------------------------- */
.iot-login {
    max-width: 420px; margin: 4rem auto; padding: 2.25rem;
    border: 1px solid var(--iot-border); border-radius: 14px;
    background: var(--iot-surface); box-shadow: var(--iot-shadow);
}
.iot-login h1 { font-size: 1.5rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.iot-login .iot-input { width: 100%; margin-bottom: 0.85rem; padding: 0.6rem 0.75rem; font-size: 1rem; }
.iot-login .iot-btn { width: 100%; justify-content: center; padding: 0.65rem 1.1rem; font-size: 1rem; }
.iot-login p { line-height: 1.5; }

/* ---- Aeration advice verdict ------------------------------------------- */
.iot-verdict {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-weight: 600; font-size: 1rem; padding: 0.4rem 0.9rem; border-radius: 999px;
}
.iot-verdict-aerate { background: #dcfce7; color: #166534; }
.iot-verdict-dry { background: #dbeafe; color: #1e40af; }
.iot-verdict-hold { background: #fef3c7; color: #92400e; }
.iot-verdict-insufficient_data { background: var(--iot-chip-bg); color: var(--iot-muted); }

/* ---- Compact header + advice strip (store data page) -------------------- */
.iot-head-tight { margin-bottom: 0.85rem; }
.iot-head-tight h1 { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.iot-head-sub { font-size: 0.85rem; font-weight: 400; }

.iot-advice-strip {
    display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap;
    padding: 0.55rem 0.9rem; margin-bottom: 1rem;
    border: 1px solid var(--iot-border); border-radius: var(--iot-radius-sm);
    background: var(--iot-surface);
}
.iot-advice-reasons {
    list-style: none; margin: 0; padding: 0; display: flex; gap: 0.75rem 1rem;
    flex-wrap: wrap; font-size: 0.82rem; color: var(--iot-ink-soft); flex: 1 1 auto; min-width: 0;
}
.iot-advice-reasons li { white-space: nowrap; }
.iot-advice-time { font-size: 0.75rem; white-space: nowrap; }

.iot-app-tight { margin-bottom: 1rem; }
.iot-app-tight .iot-row { margin: 0.3rem 0 0.6rem; }

/* ---- Chart area: stays mounted while reloading so the slider/scroll
   position never jumps (overlay a subtle "updating" state instead). ------- */
.iot-chart-area { position: relative; min-height: 120px; }
.iot-chart-area-updating { opacity: 0.55; transition: opacity 0.15s ease; }
.iot-chart-updating-badge {
    position: absolute; top: 0; right: 0;
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.78rem; font-weight: 500; color: var(--iot-muted);
    background: var(--iot-surface); border: 1px solid var(--iot-border);
    border-radius: 999px; padding: 0.2rem 0.6rem;
}
.iot-chart-updating-badge .iot-ico { width: 0.85rem; height: 0.85rem; animation: iot-spin 1s linear infinite; }
@keyframes iot-spin { to { transform: rotate(360deg); } }

/* ---- Help page ------------------------------------------------------------ */
.iot-help { max-width: 70ch; }
.iot-help p { line-height: 1.65; color: var(--iot-ink-soft); }
.iot-help-lead {
    font-size: 1.05rem; color: var(--iot-ink); margin: 0 0 1.4rem;
    line-height: 1.6;
}
.iot-help h2 {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--iot-accent); margin-top: 1.8rem;
}
.iot-help h2 .iot-ico { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.iot-help h3 { color: var(--iot-ink-soft); }
.iot-help .iot-airing { margin-top: 0.75rem; }

/* Small inline icon-link beside a section heading, opens /help for context. */
.iot-help-link {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: 0.15rem; color: var(--iot-faint); text-decoration: none;
    transition: color .12s ease;
}
.iot-help-link .iot-ico { width: 1rem; height: 1rem; vertical-align: -0.15em; }
.iot-help-link:hover { color: var(--iot-accent); }

/* Help link in the host top bar (top-right, inside .top-row). */
.iot-help-top {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--iot-accent); text-decoration: none;
    font-size: 0.95rem; font-weight: 500;
    transition: color .12s ease;
}
.iot-help-top .iot-ico { width: 1.1rem; height: 1.1rem; }
.iot-help-top:hover { color: var(--iot-accent-ink); text-decoration: underline; }

/* ---- Airing / minimum-aeration reference table --------------------------- */
.iot-airing { margin: 0.5rem 0 0; }

.iot-airing-status {
    display: block; border-radius: var(--iot-radius-sm);
    padding: 0.6rem 0.9rem; margin: 0 0 0.9rem;
    font-size: 0.92rem; line-height: 1.5;
}
.iot-airing-status strong { font-size: 0.98rem; }
.iot-airing-status.iot-airing-ok { background: #dcfce7; color: #166534; }
.iot-airing-status.iot-airing-ok strong { color: #15803d; }
.iot-airing-status.iot-airing-bad { background: #fee2e2; color: #991b1b; }
.iot-airing-status.iot-airing-bad strong { color: #b91c1c; }
.iot-airing-status .iot-muted { color: inherit; opacity: 0.8; }

.iot-airing-table {
    border-collapse: collapse; font-size: 11.5px; white-space: nowrap;
    background: var(--iot-surface);
}
.iot-airing-table th, .iot-airing-table td {
    border: 1px solid #d7dde3; padding: 2px 6px; text-align: center;
    vertical-align: middle;
}

/* Header bands: cold = cyan, equilibrium = green, warm = red. */
.iot-airing-table thead th { font-weight: 600; }
.iot-airing-table thead tr:first-child th.iot-airing-band {
    font-size: 0.85rem; padding: 4px 6px;
}
.iot-airing-table thead tr:first-child .iot-airing-cold { background: #a8e6f0; color: #0b4a57; }
.iot-airing-table thead tr:first-child .iot-airing-eq   { background: #bfe6c8; color: #14532d; }
.iot-airing-table thead tr:first-child .iot-airing-warm { background: #f6b8b8; color: #7f1d1d; }
.iot-airing-table thead tr:nth-child(2) .iot-airing-cold { background: #bfeaf5; color: #0b4a57; }
.iot-airing-table thead tr:nth-child(2) .iot-airing-warm { background: #fbd3d3; color: #7f1d1d; }

/* Moisture column: pale yellow, like the original Theimer table. */
.iot-airing-mhead, .iot-airing-mcell {
    background: #fdf3c0; color: var(--iot-ink); font-weight: 600;
    position: sticky; left: 0;
}

/* Body cells: faint region tint, compact, centred. */
.iot-airing-cell {
    background: var(--iot-surface); color: var(--iot-ink-soft); font-weight: 400;
}
.iot-airing-cell.iot-airing-cold { background: #eef9fb; }
.iot-airing-cell.iot-airing-eq   { background: #eef8f0; }
.iot-airing-cell.iot-airing-warm { background: #fdf0f0; }

/* Live operating point: bold value + coloured ring + tint, matched to verdict. */
.iot-airing-cell.iot-airing-active {
    font-weight: 700; position: relative;
}
.iot-airing-cell.iot-airing-active.iot-airing-ok {
    outline: 2px solid #15803d; outline-offset: -2px;
    background: #dcfce7; color: #14532d; z-index: 1;
}
.iot-airing-cell.iot-airing-active.iot-airing-bad {
    outline: 2px solid #b91c1c; outline-offset: -2px;
    background: #fee2e2; color: #7f1d1d; z-index: 1;
}
.iot-airing-dot {
    display: inline-block; margin-left: 2px; font-size: 8px; line-height: 1;
    vertical-align: middle;
}
.iot-airing-active.iot-airing-ok .iot-airing-dot { color: #15803d; }
.iot-airing-active.iot-airing-bad .iot-airing-dot { color: #b91c1c; }

.iot-airing-src { font-size: 0.72rem; margin-top: 0.5rem; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 520px) {
    .iot-dashboard { padding: 1.25rem 0.9rem 2.5rem; }
    .iot-head h1 { font-size: 1.3rem; }
    .iot-grid { grid-template-columns: 1fr; }
    .iot-metrics { gap: 1rem; }
    .iot-login { margin: 2rem auto; padding: 1.5rem; }
}
