:root {
  color-scheme: light dark;
  --fundo: #f5f6f8; --cartao: #fff; --texto: #1d2330; --sutil: #667085; --borda: #e3e6eb;
  --bom: #1a7f4b; --bom-fundo: #e3f4ea; --ruim: #b42318; --ruim-fundo: #fde8e6;
  --alerta: #a15c07; --alerta-fundo: #fdf1dc; --andamento: #1d5fd1; --andamento-fundo: #e4edfc;
  --neutro: #667085; --neutro-fundo: #eef0f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #12151b; --cartao: #1b1f27; --texto: #e6e9ef; --sutil: #98a1b2; --borda: #2c323d;
    --bom: #4cc38a; --bom-fundo: #173527; --ruim: #f97066; --ruim-fundo: #3d1d1a;
    --alerta: #f5b14c; --alerta-fundo: #3b2c14; --andamento: #7aa7ff; --andamento-fundo: #1b2a47;
    --neutro: #98a1b2; --neutro-fundo: #262b35;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--fundo); color: var(--texto); }
h1 { font-size: 1.15rem; margin: 0; }
h2 { font-size: 1rem; margin: 0 0 .75rem; }
a { color: var(--andamento); }
.sutil { color: var(--sutil); font-size: .85rem; }
.alerta-texto { color: var(--alerta); font-weight: 600; }
.espaco { margin-top: 1.25rem; }

.topo { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.25rem; background: var(--cartao); border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 1; }
.topo .sair { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
main { max-width: 1200px; margin: 0 auto; padding: 1.25rem; display: grid; gap: 1rem; }
main > *, .duas-colunas > * { min-width: 0; }
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 10px; padding: 1rem 1.25rem; }
.titulo-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.duas-colunas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .duas-colunas { grid-template-columns: 1fr; } .topo { flex-wrap: wrap; } }

button { font: inherit; padding: .55rem 1rem; border-radius: 8px; border: 0; background: var(--andamento); color: #fff; cursor: pointer; }
button.secundario { background: transparent; color: var(--texto); border: 1px solid var(--borda); padding: .3rem .8rem; }

.selo { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.selo.bom { color: var(--bom); background: var(--bom-fundo); }
.selo.ruim { color: var(--ruim); background: var(--ruim-fundo); }
.selo.alerta { color: var(--alerta); background: var(--alerta-fundo); }
.selo.andamento { color: var(--andamento); background: var(--andamento-fundo); }
.selo.neutro { color: var(--neutro); background: var(--neutro-fundo); }

.barra { height: 12px; background: var(--neutro-fundo); border-radius: 999px; overflow: hidden; margin: .25rem 0 .5rem; }
.barra-cheia { height: 100%; width: 0; background: var(--andamento); transition: width .6s ease; }
.barra-cheia.bom { background: var(--bom); }
.barra-cheia.ruim { background: var(--ruim); }
.barra-cheia.alerta { background: var(--alerta); }

.lista-release { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .35rem; }
.lista-release li { display: grid; grid-template-columns: 12px 1fr auto 70px; align-items: center; gap: .6rem; }
.lista-release .estado { font-size: .85rem; color: var(--sutil); }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--neutro); }
li.bom .ponto { background: var(--bom); }
li.ruim .ponto { background: var(--ruim); }
li.alerta .ponto { background: var(--alerta); }
li.andamento .ponto { background: var(--andamento); animation: pulso 1.2s infinite; }
@keyframes pulso { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { li.andamento .ponto { animation: none; } .barra-cheia { transition: none; } }

.commits { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .85rem; color: var(--sutil); max-height: 260px; overflow: auto; }
.commits .autor { margin-left: .5rem; color: var(--andamento); font-weight: 600; white-space: nowrap; }
details summary { cursor: pointer; margin-top: .75rem; font-size: .9rem; }

.rolagem { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--borda); white-space: nowrap; }
th { color: var(--sutil); font-weight: 600; font-size: .8rem; }
td.nome { font-weight: 600; }
.tipo { margin-left: .5rem; font-size: .7rem; font-weight: 500; color: var(--sutil); text-transform: uppercase; }

.eventos { list-style: none; margin: 0; padding: 0; font-size: .85rem; max-height: 420px; overflow: auto; }
.eventos li { display: grid; grid-template-columns: 92px 170px 1fr; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--borda); align-items: baseline; }
#execucoes li { grid-template-columns: 92px 1fr auto; }
.eventos .quando { color: var(--sutil); font-variant-numeric: tabular-nums; }
.eventos .quem { color: var(--sutil); overflow: hidden; text-overflow: ellipsis; }
.eventos .texto { overflow-wrap: anywhere; }
.ev-ok .texto { color: var(--bom); }
.ev-erro .texto, .ev-falha .texto { color: var(--ruim); font-weight: 600; }
.ev-troca .texto, .ev-rollback .texto { color: var(--andamento); }
.ev-migracao .texto { color: var(--sutil); }
@media (max-width: 560px) { .eventos li { grid-template-columns: 1fr; gap: 0; } }

.maquina { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; font-size: .9rem; }
.maquina dt { color: var(--sutil); }
.maquina dd { margin: 0; }

.tela-login { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login { width: min(380px, 100%); }
.login form { display: grid; gap: .9rem; margin-top: 1rem; }
.login label { display: grid; gap: .3rem; font-size: .9rem; }
.login input { font: inherit; padding: .55rem .7rem; border-radius: 8px; border: 1px solid var(--borda); background: var(--fundo); color: var(--texto); }
.aviso { color: var(--ruim); background: var(--ruim-fundo); padding: .5rem .75rem; border-radius: 8px; margin: .75rem 0 0; font-size: .9rem; }
