/* Small additions on top of Pico CSS. */
:root { --pico-font-size: 95%; }

.brand { text-decoration: none; }
.inline-form { margin: 0; }
.inline-form button, button.small { padding: 0.3rem 0.8rem; margin: 0; font-size: 0.85rem; }

.live-status { font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 1rem; background: var(--pico-muted-border-color); }
.live-status::before { content: "●"; margin-right: 0.35rem; }
.live-status[data-state="live"]::before { color: #2ea043; }
.live-status[data-state="offline"]::before, .live-status[data-state="connecting"]::before { color: #d29922; }

.tabs { display: flex; justify-content: flex-start; gap: 0.25rem; border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1rem; }
.tabs a { padding: 0.5rem 1.1rem; text-decoration: none; border-bottom: 3px solid transparent; color: var(--pico-muted-color); }
.tabs a.active { border-bottom-color: var(--pico-primary); color: var(--pico-color); font-weight: 600; }

#search-form { display: flex; gap: 0.5rem; }
#search-form input[type="search"] { flex: 1; margin-bottom: 0; }
#search-form button { flex: 0 0 auto; width: auto; margin-bottom: 0; padding-inline: 1.5rem; }
#event-list { margin-top: 1rem; }

.event-card { padding: 1rem 1.25rem; margin-bottom: 0.9rem; }
.event-card > header, .event-card > footer { margin: -1rem -1.25rem 0.6rem; padding: 0.5rem 1.25rem; display: flex; gap: 0.75rem; align-items: center; }
.event-card > footer { margin: 0.6rem -1.25rem -1rem; font-size: 0.85rem; }
.event-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.event-card h3 a { text-decoration: none; }
.event-card time { margin-left: auto; font-size: 0.8rem; color: var(--pico-muted-color); }
.event-card.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { box-shadow: 0 0 0 3px var(--pico-primary); } to { box-shadow: var(--pico-card-box-shadow); } }

.summary { color: var(--pico-muted-color); margin-bottom: 0.5rem; font-size: 0.9rem; }
.event-type { font-family: var(--pico-font-family-monospace); font-size: 0.8rem; color: var(--pico-muted-color); }

.badge { font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 0.35rem; text-transform: uppercase; letter-spacing: 0.02em; }
.status-ok { background: #2ea04326; color: #2ea043; }
.status-ko { background: #f8514926; color: #f85149; }
.status-muted { background: #8b949e26; color: #8b949e; }
.status-info { background: #388bfd26; color: #388bfd; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.4rem 1rem; margin: 0; font-size: 0.85rem; }
.fields dt { color: var(--pico-muted-color); font-weight: normal; font-size: 0.75rem; }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.fields.detail { font-size: 0.95rem; margin-bottom: 1rem; }

.load-more { text-align: center; margin: 1rem 0; }
.empty { text-align: center; color: var(--pico-muted-color); }
.login { max-width: 24rem; margin: 3rem auto; }
.error { color: #f85149; }

.payload { max-height: 70vh; overflow: auto; font-size: 0.8rem; }
.payload code { white-space: pre; display: block; }
.json-key { color: #79c0ff; }
.json-string { color: #a5d6ff; }
html[data-theme="light"] .json-key, html:not([data-theme]) .json-key { color: #0550ae; }
html[data-theme="light"] .json-string, html:not([data-theme]) .json-string { color: #0a3069; }
@media (prefers-color-scheme: dark) { html:not([data-theme]) .json-key { color: #79c0ff; } html:not([data-theme]) .json-string { color: #a5d6ff; } }
.json-number { color: #d2a8ff; }
.json-bool, .json-null { color: #ff7b72; }
