:root {
  --fundo: #0B0F0B; --topo: #070A07; --painel: #0F1510; --cartao: #131A15; --linha: #24312A; --linha-suave: #1C261F;
  --texto: #E8EDE5; --apagado: #8A9086; --fraco: #6F766C; --lima: #C8F53C; --lima-escuro: #16241A;
  --grama: #1A8B47; --placar: #E8A93B; --perigo: #FF8A7E; --azul: #6FA8FF; --ok: #3DDC84;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Barlow", system-ui, sans-serif; background: var(--fundo); color: var(--texto); font-size: 15px; }
a { color: var(--lima); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }
.carregando { padding: 40px; color: var(--apagado); }
h1, h2 { margin: 0; }
.titulo { font-family: var(--display); font-weight: 700; text-transform: uppercase; }
.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.apagado { color: var(--apagado); }
.vazio { color: var(--apagado); font-size: 14px; padding: 8px 2px; }

/* botões e campos */
.btn { height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--linha); background: var(--cartao); font-weight: 600; }
.btn:hover { border-color: #3A4A3F; }
.btn.principal { background: var(--lima); color: #0B0F0B; border-color: transparent; font-weight: 700; }
.btn.principal:hover { background: #D6FA62; }
.btn.mini { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.perigo { color: var(--perigo); }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo span { font-size: 14px; font-weight: 600; }
input, select, textarea { background: var(--painel); border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; }
input, select { height: 44px; }
textarea { resize: vertical; min-height: 80px; }
.erro { color: var(--perigo); font-size: 14px; min-height: 18px; }

/* login */
.porta { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(700px 400px at 50% 0%, #16301E55, transparent), var(--fundo); }
.porta form { width: 100%; max-width: 400px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.porta .marca { display: flex; align-items: center; gap: 12px; }
.porta .marca img { width: 56px; height: 56px; border-radius: 14px; }
.porta .qr { background: #fff; border-radius: 12px; padding: 10px; width: 220px; margin: 0 auto; }
.porta .qr img { display: block; width: 200px; height: 200px; }
.porta .segredo { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; background: var(--painel); border-radius: 8px; padding: 8px 10px; }
.codigo-input { font-size: 28px; letter-spacing: 0.3em; text-align: center; font-family: ui-monospace, monospace; }

/* casca */
.topo { height: 64px; background: var(--topo); border-bottom: 1px solid var(--linha-suave); display: flex; align-items: center; gap: 24px; padding: 0 24px; position: sticky; top: 0; z-index: 5; }
.topo .marca { display: flex; align-items: center; gap: 10px; }
.topo .marca img { width: 40px; height: 40px; border-radius: 10px; }
.topo .marca b { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .02em; }
.topo .marca b span { color: var(--lima); }
.selo { font-size: 12px; font-weight: 600; color: var(--apagado); padding: 3px 10px; border: 1px solid var(--linha); border-radius: 999px; }
.abas { display: flex; gap: 4px; }
.abas a { padding: 8px 14px; border-radius: 8px; color: var(--apagado); text-decoration: none; font-weight: 500; }
.abas a[aria-current="page"] { background: var(--lima-escuro); color: var(--texto); font-weight: 700; }
.topo .espaco { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--lima); color: #0B0F0B; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.conteudo { padding: 20px 24px 40px; }
.cabeca { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cabeca h1 { font-size: 34px; }
.cabeca .espaco { flex: 1; }

/* cartões */
.grade { display: grid; gap: 12px; }
.g8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bloco { background: var(--cartao); border: 1px solid var(--linha); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bloco h2 { font-size: 16px; font-weight: 700; }
.bloco .linha-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi .rot { font-size: 12px; color: var(--apagado); font-weight: 600; }
.kpi .num { font-size: 34px; line-height: 1.05; }
.kpi .sub { font-size: 12px; color: var(--apagado); }
.kpi.alerta { border-color: #5A2A24; }
.barra { height: 8px; border-radius: 4px; background: var(--linha-suave); overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--lima); border-radius: 4px; }
.par { display: flex; justify-content: space-between; font-size: 13px; }
.lista { display: flex; flex-direction: column; }
.lista > div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--linha-suave); font-size: 14px; align-items: center; }
.ponto { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; display: inline-block; }
.ocorrencia { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--painel); }
.form-linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-linha input, .form-linha select { height: 38px; padding: 6px 10px; }

/* kanban */
.quadro { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.coluna { width: 270px; flex-shrink: 0; background: var(--painel); border: 1px solid var(--linha-suave); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.coluna .cab { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.coluna .cab span.n { margin-left: auto; color: var(--apagado); }
.card { background: var(--cartao); border: 1px solid var(--linha); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.card:hover { border-color: #3A4A3F; }
.card .t { font-weight: 600; line-height: 1.35; }
.card .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--apagado); gap: 6px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; align-self: flex-start; }
.tag.bug { background: #3A1A17; color: #FFB4AC; }
.tag.ideia { background: #16301E; color: #9BE7B4; }
.tag.duvida { background: #1A2638; color: #A9C6F2; }

/* lousa */
.lousa { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; }
.tela { position: relative; height: 640px; border-radius: 14px; border: 1px solid var(--linha); overflow: auto;
  background-color: #0D120E; background-image: radial-gradient(#1F2A22 1.2px, transparent 1.2px); background-size: 22px 22px; }
.tela-interna { position: relative; width: 1600px; height: 1000px; }
.nota { position: absolute; width: 200px; min-height: 110px; border-radius: 4px; padding: 10px 12px 12px; color: #1B1A10;
  box-shadow: 0 10px 24px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 4px; touch-action: none; }
.nota .alca { height: 16px; cursor: grab; display: flex; justify-content: space-between; align-items: center; }
.nota .alca button { border: 0; background: transparent; color: inherit; opacity: .6; font-size: 16px; line-height: 1; padding: 0 2px; }
.nota .txt { font-family: "Caveat", cursive; font-size: 24px; line-height: 1.15; outline: none; min-height: 60px; white-space: pre-wrap; }
.nota.amarelo { background: #FFE58A; } .nota.azul { background: #A9C6F2; } .nota.rosa { background: #FFB4AC; } .nota.verde { background: #C8F53C; }
.ferramentas { position: sticky; top: 10px; left: 10px; z-index: 2; display: inline-flex; gap: 6px; background: var(--painel); border: 1px solid var(--linha); border-radius: 10px; padding: 6px; margin: 10px; }
.cor-bolinha { width: 26px; height: 26px; border-radius: 13px; border: 2px solid transparent; }
.cor-bolinha[aria-pressed="true"] { border-color: #fff; }
.metas-quadro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meta-nota { border-radius: 6px; padding: 10px; font-weight: 600; color: #0B0F0B; display: flex; flex-direction: column; gap: 6px; }
.meta-nota.afazer { background: var(--lima); } .meta-nota.fazendo { background: var(--placar); } .meta-nota.feito { background: var(--grama); color: #fff; }
.meta-nota .acoes { display: flex; gap: 4px; flex-wrap: wrap; }
.meta-nota .acoes button { border: 0; border-radius: 6px; padding: 3px 8px; font-size: 12px; background: rgba(0,0,0,.18); color: inherit; }
details.faq { background: var(--cartao); border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { color: #C5CCC1; margin: 8px 0; white-space: pre-wrap; }

/* card aberto (gaveta lateral), chat e anexos */
button.card { font: inherit; color: inherit; cursor: pointer; width: 100%; }
.pilha { display: flex; flex-direction: column; gap: 14px; }
.fundo-gaveta { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; display: flex; justify-content: flex-end; }
.gaveta { width: min(640px, 100%); height: 100%; overflow-y: auto; background: var(--cartao); border-left: 1px solid var(--linha); padding: 20px 22px 32px; display: flex; flex-direction: column; gap: 14px; }
.gaveta-topo { display: flex; align-items: center; gap: 10px; position: sticky; top: -20px; background: var(--cartao); padding: 8px 0; z-index: 1; }
.card-titulo { margin: 0; font-size: 22px; line-height: 1.25; }
.card-desc { margin: 0; white-space: pre-wrap; line-height: 1.5; color: #D5DBD1; }
.anexos { display: flex; flex-wrap: wrap; gap: 8px; }
.anexo { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--linha); border-radius: 10px; background: var(--painel); color: var(--texto); text-decoration: none; font-size: 13px; max-width: 100%; }
.anexo:hover { border-color: #3A4A3F; }
.anexo img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.anexo-ic { width: 32px; text-align: center; font-size: 20px; }
.anexo span { overflow-wrap: anywhere; }
.anexo small { color: var(--apagado); }
.chat, .fechamento { border: 1px solid var(--linha); border-radius: 12px; background: var(--painel); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat h4, .fechamento h4 { margin: 0; font-size: 14px; }
.chat-lista { max-height: 340px; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { align-self: flex-start; max-width: 85%; background: var(--cartao); border: 1px solid var(--linha-suave); border-radius: 12px 12px 12px 4px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.msg.minha { align-self: flex-end; background: var(--lima-escuro); border-color: #2F4A1A; border-radius: 12px 12px 4px 12px; }
.msg-cab { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--apagado); }
.msg-cab b { color: var(--texto); }
.msg-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-envio { display: flex; gap: 6px; align-items: flex-end; }
.chat-envio textarea { flex: 1; min-height: 44px; }
.fechamento input[type=file] { height: auto; }

/* task: áreas, responsáveis e checklist */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.segmentos { display: inline-flex; gap: 4px; padding: 4px; background: var(--painel); border: 1px solid var(--linha); border-radius: 12px; flex-wrap: wrap; }
.segmentos button { border: 0; background: transparent; color: var(--apagado); font-weight: 600; padding: 8px 14px; border-radius: 8px; display: inline-flex; gap: 8px; align-items: center; }
.segmentos button.on { background: var(--lima); color: #0B0F0B; }
.segmentos .n { font-size: 12px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.segmentos button.on .n { background: rgba(0,0,0,.15); }
.alternar { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.alternar input { width: 18px; height: 18px; accent-color: var(--lima); }
.avatares { display: inline-flex; }
.avatar.mini-av { width: 24px; height: 24px; font-size: 10px; border-radius: 12px; border: 2px solid var(--cartao); flex-shrink: 0; }
.avatares .mini-av + .mini-av { margin-left: -6px; }
.avatar.mais { background: var(--linha); color: var(--texto); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--linha); background: var(--painel); font-size: 13px; font-weight: 600; color: var(--apagado); }
.chip.on { border-color: var(--lima); color: var(--texto); background: var(--lima-escuro); }
.chip:not(.on) .mini-av { background: var(--linha); color: var(--apagado); }
.progresso { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--apagado); font-variant-numeric: tabular-nums; }
.progresso .barra { flex: 1; height: 6px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--linha-suave); flex-wrap: wrap; }
.checklist label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; min-width: 0; }
.checklist input { width: 18px; height: 18px; accent-color: var(--grama); flex-shrink: 0; }
.checklist .riscado { text-decoration: line-through; color: var(--apagado); }
.checklist .x { border: 0; background: transparent; color: var(--apagado); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.checklist .x:hover { color: var(--perigo); }
.anexo-ic { font-size: 11px; font-weight: 700; color: var(--apagado); }
.card .t { overflow-wrap: anywhere; }

/* licenças */
.rolagem { overflow-x: auto; }
.num-cel { font-variant-numeric: tabular-nums; text-align: right; }
.equipe-cel { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.equipe-cel img, .escudo-vazio { width: 32px; height: 32px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.escudo-vazio { display: grid; place-items: center; background: var(--lima-escuro); color: var(--lima); font-weight: 700; }
.pilula { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pilula.ok { background: #16301E; color: #9BE7B4; }
.pilula.alerta { background: #3A2A10; color: #F5C46B; }
.pilula.fraco { background: var(--linha-suave); color: var(--apagado); }
.pilula.livre { background: var(--lima-escuro); color: var(--lima); }
.btn.perigo-cheio { background: var(--perigo); color: #1A0B09; border-color: transparent; font-weight: 700; }
.btn.perigo-cheio:disabled { background: var(--linha); color: var(--apagado); cursor: not-allowed; }
.aviso.perigo-aviso { background: #2A1412; border-color: #5A2A24; line-height: 1.5; }
code.codigo { font-family: ui-monospace, monospace; font-size: 13px; letter-spacing: .04em; white-space: nowrap; }
.codigos { border: 1px solid #2F4A1A; background: var(--lima-escuro); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.codigos pre { margin: 0; font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .06em; white-space: pre-wrap; user-select: all; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--apagado); font-weight: 600; padding: 8px; }
td { padding: 10px 8px; border-top: 1px solid var(--linha-suave); }
.aviso { background: #1E1A10; border: 1px solid #5A4A1A; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

@media (max-width: 1100px) {
  .g8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g3, .g2, .lousa { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topo { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .g8, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conteudo { padding: 16px; }
}
