/* CLIPS review: one stylesheet, no inline styles (the CSP is style-src 'self'). */
:root { --bg: #f5f5f2; --fg: #1d1f21; --muted: #666; --accent: #1f6feb; --danger: #b42318; --ok: #1a7f37; --card: #fff; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
button { font: inherit; padding: .45em .9em; border-radius: 6px; border: 1px solid #bbb; background: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: #eee; }
button.danger { border-color: var(--danger); color: var(--danger); }
button.link { border: none; background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button#confirm:not(:disabled) { background: var(--ok); color: #fff; border-color: var(--ok); }
.inline { display: inline; }
.topbar { display: flex; gap: 1rem; align-items: center; padding: .6rem 1rem; background: #20242a; color: #eee; flex-wrap: wrap; }
.topbar a, .topbar button.link { color: #9ecbff; }
.topbar nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.badge { background: var(--danger); color: #fff; border-radius: 999px; padding: .1rem .6rem; font-size: .85em; }
.login-box { max-width: 22rem; margin: 12vh auto; background: var(--card); padding: 1.5rem; border-radius: 10px; }
.login-box label { display: block; margin: .8rem 0; }
.login-box input { width: 100%; padding: .5em; }
.error { color: var(--danger); }
.notice { background: #fff8c5; padding: .5rem .8rem; border-radius: 6px; }
.hint { color: var(--muted); }
#card { padding: .8rem; max-width: 1600px; margin: 0 auto; }
.card { background: var(--card); border-radius: 10px; padding: .8rem 1rem; }
.card-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: .5rem; }
.options { display: flex; flex-direction: column; gap: .8rem; }
.option { display: flex; gap: .6rem; align-items: flex-start; border-top: 1px solid #eee; padding-top: .6rem; }
.option.flagged { outline: 2px solid var(--danger); }
.option.selected { background: #eef6ff; }
.option-label { font-weight: 700; min-width: 3.2rem; }
.tiles { display: flex; gap: .5rem; flex-wrap: wrap; }
.tile { position: relative; padding: 0; border: 3px solid transparent; background: #fafafa; margin: 0; }
.tile img { display: block; max-height: 38vh; max-width: 46vw; }
.tile.selected { border-color: var(--ok); }
.tile-caption, figcaption { position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .8em; padding: .1rem .4rem; }
.divergent { display: flex; gap: .6rem; margin: .8rem 0; flex-wrap: wrap; }
.divergent-choice.selected { background: #eef6ff; border-color: var(--accent); }
.vote { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; flex-wrap: wrap; }
.vote .selection { margin: 0; min-width: 14rem; }
.card-actions { margin-top: .6rem; display: flex; gap: .6rem; }
.keys { color: var(--muted); font-size: .85em; margin-top: .6rem; }
dialog { border: none; border-radius: 10px; max-width: 32rem; width: 92vw; }
dialog label { display: block; margin: .6rem 0; }
dialog select, dialog textarea { width: 100%; }
.dialog-actions { display: flex; gap: .6rem; }
.zoom { max-width: 98vw; max-height: 98vh; padding: .3rem; }
.zoom img { max-width: 96vw; max-height: 90vh; }
.triage-form { margin-top: .8rem; display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.admin-main { padding: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; }
table { border-collapse: collapse; background: var(--card); }
th, td { padding: .3rem .6rem; border-bottom: 1px solid #eee; text-align: left; }
td.num { text-align: right; }
.mono { font-family: ui-monospace, monospace; font-size: .9em; }
tr.over td { background: #fde2e1; }
.queue-state { padding: .4rem .6rem; border-radius: 6px; background: #eef6ff; }
.queue-state.idle { background: #fff8c5; }
.queue-state.stalled { background: #fde2e1; color: var(--danger); font-weight: 600; }
tr.flagged td { background: #fff1f0; }
tr.inactive td { color: var(--muted); }
.filters { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; align-items: center; }
.candidate { background: var(--card); padding: .5rem; margin-bottom: .6rem; border-radius: 8px; }
.candidate .tile img { max-height: 24vh; }
.flag { background: var(--card); padding: .3rem .6rem; margin-bottom: .4rem; border-left: 4px solid #999; }
.flag.open { border-left-color: var(--danger); }
.map { height: 72vh; border-radius: 8px; }
.error-page { max-width: 30rem; margin: 20vh auto; text-align: center; }
.sheet { padding: 1rem; max-width: 1600px; margin: 0 auto; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.sheet-tile { display: block; color: inherit; text-decoration: none; }
.sheet-tile figure { position: relative; margin: 0; background: var(--card); border-radius: 8px; overflow: hidden; }
.sheet-tile img { display: block; width: 100%; height: 11rem; object-fit: cover; }
.sheet-none { display: flex; align-items: center; justify-content: center; height: 11rem; background: #eee; color: var(--muted); text-align: center; padding: .5rem; }
.sheet-tile figcaption { position: static; background: none; color: var(--fg); padding: .5rem; }
@media (max-width: 700px) { .tile img { max-width: 92vw; max-height: 34vh; } .option { flex-direction: column; } }
.pill { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .85em; background: #e5e7eb; color: #333; }
.pill.ok { background: #dcfce7; color: #166534; } .pill.bad { background: #fde2e1; color: var(--danger); } .pill.idle { background: #fff8c5; color: #7a5b00; }
.pill.cmd-run { background: #dcfce7; color: #166534; } .pill.cmd-pause, .pill.cmd-drain, .pill.cmd-stop { background: #fff8c5; color: #7a5b00; }
pre.output { background: #0d1117; color: #c9d1d9; padding: .8rem; border-radius: 6px; overflow: auto; max-height: 34rem; font: 12px/1.4 ui-monospace, monospace; white-space: pre-wrap; }
.code { font-size: 1.4rem; background: #fff; border: 2px dashed var(--accent); padding: .8rem 1rem; border-radius: 8px; display: inline-block; letter-spacing: .05em; user-select: all; }
.card h3 { margin: 1rem 0 .4rem; font-size: 1rem; } tr.inactive td { opacity: .55; }
td form.inline { margin-right: .3rem; } td button { padding: .25em .6em; }
/* Classificação (IA), SPEC-AMMEND A24 */
.cls-summary { margin: .3rem 0; }
.cls-filters { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .8rem 0; }
.cls-wrap { overflow-x: auto; }
.cls-table { font-size: .82em; }
.cls-table th { white-space: nowrap; font-weight: 600; }
.cls-table td { white-space: nowrap; }
.cls-table td.div, .cls-votes tr.div td:first-child { box-shadow: inset 3px 0 0 #b4540a; background: #fff4e8; }
.cls-table tr.outdated td { color: var(--muted); }
.cls-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.cls-counts h3 { margin: 0 0 .3rem; font-size: 1em; }
.cls-counts table { width: 100%; font-size: .85em; }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.cls-tile { display: flex; flex-direction: column; background: var(--card); border-radius: 8px; padding: .3rem; text-decoration: none; color: var(--fg); font-size: .8em; }
.cls-tile img { width: 100%; height: 180px; object-fit: contain; background: #fff; border-radius: 4px; }
.cls-votes { font-size: .85em; margin-top: .6rem; }
.flagline { margin: .2rem 0; color: #b4540a; }
textarea.yaml { width: 100%; font: 12.5px/1.4 ui-monospace, monospace; }
pre.diff { background: var(--card); padding: .6rem; border-radius: 6px; overflow-x: auto; font-size: 12.5px; }
pre.diff .add { color: #1a7f37; background: #e6ffec; display: inline-block; width: 100%; }
pre.diff .del { color: #b42318; background: #ffebe9; display: inline-block; width: 100%; }
pre.diff .hunk { color: var(--muted); }
.cls-activate { margin-top: 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
tr.active td { background: #eef6ff; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; border: 1px solid #bbb; vertical-align: middle; }
.cor-branco { background: #f2f2ee; } .cor-cinza { background: #969696; } .cor-bege { background: #decdaa; }
.cor-amarelo { background: #e8c846; } .cor-laranja { background: #e18232; } .cor-vermelho { background: #aa412d; }
.cor-rosa { background: #e191aa; } .cor-roxo { background: #9673b9; } .cor-azul { background: #467dc3; }
.cor-verde { background: #5f9b5f; } .cor-marrom { background: #735037; } .cor-preto { background: #232323; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid #bbb; border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: #fafafa; }
