/* Layout + components for the EcoNet admin UI. Colors come from Pico's CSS custom properties so light and dark themes both work without overrides. */ body { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem; } .app-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; } .app-header hgroup { margin-bottom: 0; } .theme-toggle { flex: 0 0 auto; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; font-size: 1.25rem; line-height: 1; } /* Comfortable, capped card width that wraps and centers, so a single device sits in a tidy card surrounded by whitespace rather than stretching wide or getting crammed. min(100%, 420px) keeps it fluid on narrow screens. */ .device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 460px)); justify-content: center; gap: 2rem; } .device-card { margin: 0; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; } .card-head { display: flex; align-items: center; gap: 1rem; } .device-icon { flex: 0 0 auto; width: 56px; height: 56px; color: var(--pico-primary); } .card-title { flex: 1 1 auto; min-width: 0; line-height: 1.3; } .card-title strong { display: block; font-size: 1.2rem; } .card-title small { color: var(--pico-muted-color); word-break: break-all; } .bug-btn { flex: 0 0 auto; padding: 0.25rem 0.4rem; background: none; border: none; border-radius: var(--pico-border-radius); font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: 0.55; transition: opacity 0.15s ease; } .bug-btn:hover { opacity: 1; } .dot { flex: 0 0 auto; width: 0.8rem; height: 0.8rem; border-radius: 50%; display: inline-block; } .dot-ok { background: var(--pico-color-green-500, #22c55e); } .dot-off { background: var(--pico-color-red-500, #ef4444); } .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; } .stats > div { display: flex; flex-direction: column; gap: 0.2rem; } .stats span { color: var(--pico-muted-color); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; } .stats b { font-size: 1.1rem; } .fill { display: flex; flex-direction: column; gap: 0.45rem; } .fill-head { display: flex; justify-content: space-between; align-items: baseline; } .fill-head span { color: var(--pico-muted-color); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; } .fill-meter { height: 0.6rem; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--pico-muted-color) 22%, transparent); } .fill-bar { height: 100%; border-radius: 999px; transition: width 0.4s ease; } .fill-high { background: var(--pico-color-green-500, #22c55e); } .fill-mid { background: var(--pico-color-amber-500, #f59e0b); } .fill-low { background: var(--pico-color-red-500, #ef4444); } .card-foot { display: flex; flex-direction: column; gap: 0.6rem; } .mode-label { margin: 0; font-size: 0.85rem; color: var(--pico-muted-color); } .mode-label select { margin-top: 0.35rem; margin-bottom: 0; } .mode-fixed { color: var(--pico-muted-color); } .badge { align-self: flex-start; padding: 0.2rem 0.55rem; border-radius: var(--pico-border-radius); font-size: 0.8rem; } .badge-pending { background: var(--pico-primary-background); color: var(--pico-primary-inverse); } .badge-error { background: var(--pico-color-red-500, #ef4444); color: #fff; } .empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; } .debug-modal pre { max-height: 65vh; overflow: auto; margin: 0; } .debug-modal code { white-space: pre; } /* Mobile: tighten spacing; the grid already collapses to a single full-width column via minmax(min(100%, 420px), …). */ @media (max-width: 480px) { body { padding: 1.25rem 1rem; } .app-header { margin-bottom: 1.5rem; } .app-header h1 { font-size: 1.6rem; } .device-grid { gap: 1.25rem; } .device-card { padding: 1.5rem; gap: 1.25rem; } .device-icon { width: 48px; height: 48px; } }