:root {
  --pico-font-size: 95%;
  --ok: #2e9d57;
  --warn: #c98a00;
  --bad: #d23f3f;
  --idle: #7a8794;
}

.brand { margin: 0; letter-spacing: .04em; }
.muted { color: var(--pico-muted-color); margin: 0; }
.error { color: var(--bad); }
.success { color: var(--ok); }

main.login { max-width: 420px; padding-top: 10vh; }

nav.top { border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1rem; }
nav.top a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.grid-cards article { margin: 0; padding: 1rem; }
.grid-cards h6 { margin: 0 0 .25rem; color: var(--pico-muted-color); font-weight: 500; }
.grid-cards .value { font-size: 1.4rem; font-weight: 700; }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; color: #fff; background: var(--idle); white-space: nowrap; }
.badge.Running { background: var(--ok); }
.badge.Connecting, .badge.WaitingPublisher { background: var(--warn); }
.badge.Error, .badge.ModelsUnavailable { background: var(--bad); }

.plate { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; }
.thumb { height: 36px; border-radius: 4px; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button { padding: .25rem .6rem; margin: 0 0 0 .25rem; width: auto; }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }

dialog article { max-width: 900px; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }

.roi-box { position: relative; display: inline-block; max-width: 100%; user-select: none; cursor: crosshair; }
.roi-box img { display: block; max-width: 100%; }
.roi-rect { position: absolute; border: 2px dashed #ffb300; background: rgba(255, 179, 0, .12); pointer-events: none; }

.flash { position: fixed; right: 1rem; bottom: 1rem; z-index: 1000; max-width: 420px; }
.flash article { margin: 0; padding: .75rem 1rem; }

[x-cloak] { display: none !important; }
