body { margin: 0; font-family: system-ui, sans-serif; color: #1d3b22; background: #f6f9f5; }
header { display: flex; gap: 1rem; align-items: center; justify-content: space-between;
         padding: .8rem 1rem; background: #2f6b3a; color: #fff; flex-wrap: wrap; }
header a { color: #fff; margin-right: .8rem; text-decoration: none; }
button { padding: .4rem .9rem; border: 0; border-radius: 6px; cursor: pointer; background: #e2ebe0; color: inherit; font: inherit; }
button.primary { background: #2f6b3a; color: #fff; }
main { padding: 1rem; max-width: 900px; margin: auto; }
h2 { margin-top: 1.6rem; font-size: 1.15rem; }
.row { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.card { background: #fff; border-radius: 10px; padding: 1rem; box-shadow: 0 1px 4px #0002; }
.card.value { text-align: left; display: flex; flex-direction: column; gap: .2rem; border: 2px solid transparent; }
.card.value h3 { margin: 0; font-size: .95rem; }
.card.value.selected { border-color: #2f6b3a; }
.card.value.low, .card.value.high { background: #fff4e5; }
.card.value.stale { opacity: .6; }
.big { font-size: 1.6rem; font-weight: 600; margin: .2rem 0; }
.banner { padding: .6rem .8rem; border-radius: 8px; }
.banner.ok { background: #e3f4e6; }
.banner.bad, .bad { background: #fde8e8; color: #8a1c1c; }
.ok { color: #1f6b2c; }
.muted { color: #66756a; }
.small, small { font-size: .85rem; display: block; }
.warn { color: #9a5b00; }
.tag { display: inline-block; font-size: .75rem; padding: .1rem .5rem; margin-left: .4rem; border-radius: 99px; background: #e2ebe0; }
.list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.list li { background: #fff; border-radius: 10px; padding: .8rem; box-shadow: 0 1px 4px #0002; }
.incident.critical { border-left: 5px solid #c0392b; }
.incident.warning { border-left: 5px solid #e6a23c; }
.incident.cleared { opacity: .75; }
.incident p { margin: .3rem 0; }
.actions { display: flex; gap: .5rem; margin-top: .5rem; }
.chart { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px #0002; padding: .5rem; }
.chart svg { width: 100%; height: 160px; }
.chart .line { fill: none; stroke: #2f6b3a; stroke-width: 2; }
.chart .buffered { fill: #fff; stroke: #9a5b00; stroke-width: 1.5; }
input, select { padding: .35rem; border: 1px solid #c5d3c2; border-radius: 6px; font: inherit; }
input[type=number] { width: 6rem; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: .5rem; text-align: left; border-bottom: 1px solid #e8eee6; font-size: .9rem; }
.camera canvas { width: 100%; height: auto; display: block; border-radius: 8px; background: #1d3b22; }
.camera canvas.stale { filter: grayscale(1); opacity: .6; }
.camera-tags { list-style: none; padding: 0; margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.camera-tags .tag { margin-left: 0; font-size: .85rem; }

#assistant-question { display: block; width: 100%; box-sizing: border-box; margin: .6rem 0; padding: .6rem; border: 1px solid #c5d3c2; border-radius: 6px; font: inherit; resize: vertical; }
.assistant-message { margin-top: 1rem; overflow-wrap: anywhere; }
.assistant-answer { white-space: pre-wrap; }
#assistant-send:disabled { opacity: .6; cursor: wait; }
