/* Chamados CIGA · cores Ciga (verde e marrom) sobre o design system QueryLab */
:root {
  --bg: #F3F0E9; --surface: #FAF8F3; --white: #FFFFFF; --line: #DCD6CA; --soft: #ECE7DD;
  --text: #111111; --text-2: #4A443C; --mute: #7A7266;
  --brown: #3A2315; --green: #3F7A12; --green-dark: #2E5A0D; --green-ciga: #65A624;
  --green-soft: #E4F0D6; --gold: #D89C30; --gold-soft: #FBF1DE; --gold-text: #5C3D08;
  --red: #B3141A; --red-soft: #FCE4E4; --red-text: #8E1015;
  --radius: 8px; --radius-lg: 12px;
  --font: 'IBM Plex Sans', system-ui, sans-serif; --display: 'Quicksand', sans-serif; --mono: 'IBM Plex Mono', monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); } a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.2; }
h1 { font-size: 28px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); font-size: 14px; }

.topo { background: var(--brown); color: var(--bg); padding: 10px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.marca { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--bg); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.marca:hover { color: var(--bg); }
.selo { font-family: var(--font); font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--green-ciga); color: var(--text); }
.menu { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 14px; }
.menu a { color: #D8D2C8; text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; }
.menu a.ativo, .menu a:hover { color: var(--bg); border-color: var(--gold); }
.usuario { display: flex; gap: 12px; align-items: center; font-size: 14px; color: #D8D2C8; }
.usuario a, .usuario button { color: var(--bg); }
.sino { position: relative; display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; text-decoration: none; }
.sino b { position: absolute; top: 4px; right: 2px; background: var(--gold); color: var(--text); font-size: 11px; border-radius: 999px; padding: 0 5px; }
.link-btn { background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; min-height: 44px; }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 16px; display: flex; flex-direction: column; gap: 20px; }
main.estreito { max-width: 880px; }
.cabecalho { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.colunas { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.colunas > .principal { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.colunas > .lateral { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grade .cheio { grid-column: 1 / -1; }

label, .rotulo { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  font: inherit; font-size: 16px; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text);
}
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.campo { display: flex; flex-direction: column; }
.ajuda { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.erro { font-size: 13px; color: var(--red); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-weight: 400; margin: 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.check .pts { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--text-2); }
.radios { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.radios label, .radios div { display: flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 400; margin: 0; }
.radios input { width: 20px; height: 20px; accent-color: var(--green); }
fieldset { border: 0; margin: 0; padding: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--text); background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--soft); color: var(--text); }
.btn-primario { background: var(--green); border-color: var(--green); color: var(--white); font-weight: 600; }
.btn-primario:hover { background: var(--green-dark); color: var(--white); }
.btn-perigo { border-color: var(--red); color: var(--red); }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.acoes.fim { justify-content: flex-end; }

.abas { display: flex; flex-wrap: wrap; gap: 8px; }
.abas a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); text-decoration: none; font-size: 14px; }
.abas a.ativo { background: var(--text); color: var(--bg); border-color: var(--text); }

.chip { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--brown); white-space: nowrap; }
.chip-verde { background: var(--green-soft); color: var(--green-dark); }
.chip-ouro { background: var(--gold-soft); color: var(--gold-text); }
.chip-vermelho { background: var(--red-soft); color: var(--red-text); }

.aviso { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: 14px 16px; color: var(--gold-text); font-size: 15px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.mensagens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mensagens li { padding: 12px 16px; border-radius: var(--radius); background: var(--green-soft); color: var(--green-dark); }
.mensagens li.error { background: var(--red-soft); color: var(--red-text); }
.mensagens li.warning { background: var(--gold-soft); color: var(--gold-text); }

.popup { position: fixed; right: 16px; bottom: 16px; z-index: 10; max-width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.popup form { background: var(--text); color: var(--bg); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.popup .ponto { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.popup button { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; text-align: left; }

.lista-itens { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; text-decoration: none; color: var(--text); }
.item:hover { border-color: var(--text-2); color: var(--text); }
.item .id { font-family: var(--mono); font-size: 14px; color: var(--text-2); min-width: 56px; }
.item .titulo { flex: 999 1 260px; font-weight: 500; }
.item .meta { font-size: 13px; color: var(--text-2); }

.etapas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.etapas li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.etapas li.feita { background: var(--soft); border-color: var(--soft); }
.etapas li.atual { background: var(--green); border-color: var(--green); color: var(--white); font-weight: 600; }

dl.dados { margin: 0; }
dl.dados dt { font-size: 13px; color: var(--text-2); }
dl.dados dd { margin: 0 0 12px; font-size: 15px; }
.prazo { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: 16px 20px; color: var(--gold-text); }
.prazo.vencido { background: var(--red-soft); border-color: var(--red); color: var(--red-text); }
.prazo strong { font-family: var(--mono); font-size: 22px; font-weight: 500; display: block; }
.placar { background: var(--brown); color: var(--bg); border-radius: var(--radius-lg); padding: 20px; }
.placar .score { font-family: var(--mono); font-size: 44px; }
.faixas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 12px; text-align: center; margin-top: 10px; }
.faixas span { padding: 6px 0; border-radius: 4px; border: 1px solid var(--mute); }
.faixas span.ativa { background: var(--bg); color: var(--brown); font-weight: 600; }

.historico { list-style: none; margin: 0; padding: 0; }
.historico li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.historico .quando { font-family: var(--mono); color: var(--text-2); min-width: 130px; }

.rolagem { overflow-x: auto; }
table.tabela { width: 100%; border-collapse: collapse; min-width: 560px; }
.tabela th { font-size: 13px; font-weight: 500; color: var(--text-2); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tabela td { font-size: 14px; padding: 12px; border-bottom: 1px solid var(--soft); vertical-align: top; }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; min-width: 1380px; }
.kanban section { background: var(--soft); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.kanban h2 { font-family: var(--font); font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; padding: 4px 4px 0; }
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.cartao:hover { border-color: var(--text-2); color: var(--text); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.kpi span { font-size: 13px; color: var(--text-2); display: block; }
.kpi strong { font-family: var(--mono); font-size: 30px; font-weight: 500; }
.barras { display: flex; flex-direction: column; gap: 8px; }
.barra { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 40px; gap: 8px; align-items: center; font-size: 13px; }
.barra .trilho { background: var(--soft); border-radius: 4px; height: 14px; }
.barra .valor { background: var(--brown); border-radius: 4px; height: 14px; }
.barra .n { font-family: var(--mono); text-align: right; }

.gantt { min-width: 900px; }
.gantt .linha { display: grid; grid-template-columns: 260px 1fr; align-items: center; border-bottom: 1px solid var(--soft); min-height: 50px; }
.gantt .rotulo-g { padding: 6px 12px; font-size: 14px; }
.gantt .faixa { position: relative; height: 100%; min-height: 50px; display: grid; }
.gantt .dias { display: grid; font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: center; }
.gantt .dias span { padding: 8px 0; border-left: 1px solid var(--soft); }
.gantt .dias span.hoje { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.gantt .bar { position: absolute; top: 14px; height: 22px; border-radius: 4px; }
.gantt .bar.agora { background: var(--green); }
.gantt .bar.previsto { border: 1.5px dashed var(--brown); background: var(--soft); }
.gantt .bar.vencido { background: var(--red); border: 0; }
.legenda { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); }
.legenda i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login .card { width: 100%; max-width: 420px; padding: 36px 28px; gap: 18px; }
.logo-ciga { width: 44px; height: 44px; border-radius: var(--radius); background: var(--brown); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 22px; }

.rodape { border-top: 1px solid var(--line); padding: 12px 24px; display: flex; justify-content: center; }
.rodape a { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.rodape img { height: 22px; width: auto; display: block; }

@media (max-width: 640px) {
  .topo { padding: 10px 16px; }
  h1 { font-size: 24px; }
  .card { padding: 16px; }
}
