/* Painel /adm — menu lateral escuro, conteudo claro, cores da marca NECSO. */

:root {
  --azul: #017de5;
  --azul-escuro: #004aad;
  --marinho: #01243f;
  --marinho-2: #01355c;
  --fundo: #f3f6fa;
  --superficie: #ffffff;
  --borda: #e3e9f1;
  --texto: #14243a;
  --texto-2: #5b6b80;
  --texto-3: #8a98ab;
  --verde: #16a35a;
  --verde-fundo: #e7f7ee;
  --vermelho: #d93a2b;
  --vermelho-fundo: #fdeceb;
  --amarelo: #c98a00;
  --amarelo-fundo: #fff6dd;
  --azul-fundo: #e8f2fd;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(1, 36, 63, .05), 0 4px 16px rgba(1, 36, 63, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--fundo);
  color: var(--texto);
}
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14.5px; font-weight: 600; }
p { margin: 0 0 10px; }
.ic { flex: none; }

/* ---------- moldura ---------- */
.app { padding-left: 248px; }
.lateral {
  position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 30;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 16px;
  background: linear-gradient(180deg, var(--marinho) 0%, var(--marinho-2) 100%);
  color: #cfe0f2;
  overflow-y: auto;
}
.marca { display: block; padding: 0 10px 18px; }
.marca img { height: 34px; width: auto; display: block; }
.lateral nav { display: flex; flex-direction: column; gap: 2px; }
.lateral nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: #cfe0f2; font-weight: 500; font-size: 14px;
}
.lateral nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.lateral nav a.ativo { background: var(--azul); color: #fff; box-shadow: 0 4px 14px rgba(1, 125, 229, .35); }
.lateral nav a span { flex: 1; }
.contador {
  font-style: normal; font-size: 11.5px; font-weight: 600;
  background: #f5b301; color: var(--marinho);
  border-radius: 999px; padding: 1px 8px;
}
.secao {
  display: block; margin: 16px 12px 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8fb2d4;
}
.eu {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06);
}
.eu-info { min-width: 0; }
.eu-info b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eu-info small { display: block; color: #8fb2d4; font-size: 11.5px; line-height: 1.35; }
.rodape-nav { margin-top: 4px; }

.abrir-menu, .fundo-menu { display: none; }

.conteudo { max-width: 1180px; margin: 0 auto; padding: 32px 36px 60px; }
.cabecalho {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.cabecalho h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.subtitulo { margin: 4px 0 0; color: var(--texto-2); max-width: 760px; }

@media (max-width: 900px) {
  .app { padding-left: 0; }
  .lateral { transform: translateX(-100%); transition: transform .2s ease; }
  .menu-aberto .lateral { transform: none; box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
  .menu-aberto .fundo-menu { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(1, 36, 63, .45); }
  .abrir-menu {
    display: grid; place-items: center; position: fixed; top: 12px; left: 12px; z-index: 25;
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--borda);
    background: var(--superficie); color: var(--marinho); box-shadow: var(--sombra); cursor: pointer; padding: 0;
  }
  .conteudo { padding: 16px 16px 48px; }
  .cabecalho { padding-left: 54px; min-height: 42px; margin-bottom: 18px; }
  .cabecalho h1 { font-size: 20px; }
}

/* ---------- blocos basicos ---------- */
.cartao {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 22px; margin-bottom: 18px;
}
.cartao > h2 { margin-bottom: 14px; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cartao-topo h2 { margin: 0; }
.meta { color: var(--texto-2); font-size: 13px; }
.sutil { color: var(--texto-3); font-size: 12.5px; }
.vazio { text-align: center; color: var(--texto-2); padding: 34px 16px; }
.vazio .ic { width: 34px; height: 34px; color: var(--texto-3); margin-bottom: 6px; }
.grade { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grade > .cartao { margin-bottom: 0; }
.duas-col { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .duas-col { grid-template-columns: 1fr; } }

.aviso {
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500;
  background: var(--verde-fundo); color: #0d6b3a; border: 1px solid #bfe8cf;
}
.aviso.erro { background: var(--vermelho-fundo); color: #9b2117; border-color: #f5c6c1; }
.aviso.alerta { background: var(--amarelo-fundo); color: #7a5300; border-color: #f3dc9a; }
.aviso ul { margin: 8px 0 0; padding-left: 20px; font-weight: 400; }

/* estatisticas */
.numeros { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 20px; }
.numero {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 16px 18px; box-shadow: var(--sombra);
}
.numero b { display: block; font-size: 26px; font-weight: 700; color: var(--marinho); line-height: 1.15; }
.numero span { color: var(--texto-2); font-size: 13px; }
.numero.alerta b { color: var(--vermelho); }

/* atalhos do inicio */
.atalho {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 18px; box-shadow: var(--sombra); color: var(--texto); transition: border-color .15s, transform .15s;
}
.atalho:hover { border-color: var(--azul); transform: translateY(-2px); text-decoration: none; }
.atalho .ic-caixa { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--azul-fundo); color: var(--azul); flex: none; }
.atalho h3 { margin-bottom: 2px; }
.atalho p { margin: 0; color: var(--texto-2); font-size: 13px; }

/* ---------- formularios ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--texto-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=file], input[type=date], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--texto);
  padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(1, 125, 229, .15); background: #fff; }
textarea { resize: vertical; }
.campo { margin-bottom: 14px; }
.campos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; }
.campos .campo { margin: 0; }
.ajuda { color: var(--texto-3); font-size: 12px; margin-top: 4px; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  padding: 7px 12px; border: 1px solid var(--borda); border-radius: 999px; background: #fbfcfe;
  color: var(--texto); font-weight: 500;
}
.checks label:has(input:checked) { border-color: var(--azul); background: var(--azul-fundo); color: var(--azul-escuro); }
.checks input { accent-color: var(--azul); margin: 0; }

button, .botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--azul); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
button:hover, .botao:hover { background: var(--azul-escuro); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.secundario { background: var(--superficie); color: var(--texto); border-color: var(--borda); }
.secundario:hover { background: var(--fundo); border-color: #cdd7e3; }
.perigo { background: var(--superficie); color: var(--vermelho); border-color: #f2c4bf; }
.perigo:hover { background: var(--vermelho-fundo); }
.sucesso { background: var(--verde); }
.sucesso:hover { background: #0f8448; }
.pequeno { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.icone-so { padding: 7px; }
.icone-so .ic { width: 16px; height: 16px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
form.linha input, form.linha select { width: auto; flex: 1; min-width: 120px; }
form.so-botao { display: inline; margin: 0; }

/* ---------- etiquetas, tabelas, listas ---------- */
.etiqueta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--fundo); color: var(--texto-2); white-space: nowrap;
}
.etiqueta.azul { background: var(--azul-fundo); color: var(--azul-escuro); }
.etiqueta.verde { background: var(--verde-fundo); color: #0d6b3a; }
.etiqueta.vermelho { background: var(--vermelho-fundo); color: #9b2117; }
.etiqueta.amarelo { background: var(--amarelo-fundo); color: #7a5300; }

.tabela-caixa { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabela th { text-align: left; font-weight: 500; color: var(--texto-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: 10px; border-bottom: 1px solid var(--borda); }
.tabela tr:last-child td { border-bottom: 0; }

.lista > .linha-item { padding: 16px 0; border-bottom: 1px solid var(--borda); }
.lista > .linha-item:first-child { padding-top: 0; }
.lista > .linha-item:last-child { border-bottom: 0; padding-bottom: 0; }
.linha-item.apagado { opacity: .55; }
.item-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.item-topo b { font-weight: 600; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--azul); color: #fff;
}
.avatar.grande { width: 44px; height: 44px; font-size: 17px; }

details > summary { cursor: pointer; color: var(--azul); font-weight: 500; font-size: 13px; margin-top: 12px; }
details[open] > summary { margin-bottom: 10px; }

/* ---------- login ---------- */
.solo { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--marinho) 0%, var(--azul-escuro) 100%); }
.solo .conteudo { width: 100%; max-width: 420px; padding: 24px 16px; }
.solo-cartao { background: #fff; border-radius: 18px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.solo-cartao .marca-login { height: 40px; margin: 0 auto 22px; display: block; }
.solo-cartao h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.solo-cartao .meta { text-align: center; margin-bottom: 22px; }
.solo-cartao button { width: 100%; padding: 13px; margin-top: 6px; }

/* ---------- timer de almoco ---------- */
.timer-cartao { text-align: center; padding: 36px 22px; }
.relogio {
  font-size: clamp(52px, 12vw, 84px); font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--marinho); line-height: 1.1; margin: 10px 0 18px;
}
.relogio.excedido { color: var(--vermelho); }
.relogio.mini { font-size: 22px; margin: 0; }
.legenda-excedido { display: none; color: var(--vermelho); font-weight: 600; }
.timer-cartao:has(.relogio.excedido) .legenda-excedido { display: block; }
.btn-timer { font-size: 17px; padding: 16px 34px; border-radius: 999px; background: var(--verde); }
.btn-timer:hover { background: #0f8448; }
.btn-timer.parar { background: var(--vermelho); }
.btn-timer.parar:hover { background: #b52e21; }

.barra { height: 6px; background: var(--fundo); border-radius: 999px; overflow: hidden; margin: 12px 0 0; }
.barra span { display: block; height: 100%; width: 0; background: var(--azul); border-radius: inherit; transition: width .5s linear; }
.excedido .barra span { background: var(--vermelho); }

.pessoa { border-left: 4px solid transparent; }
.pessoa.no-almoco { border-left-color: var(--amarelo); }
.pessoa.excedido { border-left-color: var(--vermelho); }
.pessoa-topo { display: flex; align-items: center; gap: 12px; }
.pessoa-info { flex: 1; min-width: 0; }
.pessoa-info b { display: block; font-weight: 600; }
.pessoa-relogio { text-align: right; }
.pessoa-relogio small { display: block; color: var(--texto-3); font-size: 11.5px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto-2); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.no-almoco .status i { background: var(--amarelo); }
.excedido .status i { background: var(--vermelho); }
.st-excedido { display: none; color: var(--vermelho); font-weight: 500; }
.pessoa.excedido .st-almoco { display: none; }
.pessoa.excedido .st-excedido { display: inline; }
.pessoa-rodape { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--borda); }
.dado small { display: block; color: var(--texto-3); font-size: 12px; }
.dado b { font-variant-numeric: tabular-nums; }
.campo-min { display: flex; align-items: center; gap: 6px; }
.campo-min input { width: 76px; padding: 7px 9px; }
.campo-min em { font-style: normal; color: var(--texto-3); font-size: 13px; }

/* ---------- projetos ---------- */
.trabalho-ativo {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--azul-escuro), var(--azul)); color: #fff;
  border-radius: var(--raio); padding: 18px 22px; margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(1, 125, 229, .25);
}
.trabalho-ativo .pulso { width: 10px; height: 10px; border-radius: 50%; background: #37d67a; box-shadow: 0 0 0 0 rgba(55, 214, 122, .7); animation: pulso 1.8s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(55, 214, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(55, 214, 122, 0); } }
.trabalho-ativo .texto { flex: 1; min-width: 180px; }
.trabalho-ativo small { display: block; opacity: .8; font-size: 12.5px; }
.trabalho-ativo b { font-size: 17px; font-weight: 600; }
.trabalho-ativo a { color: #fff; }
.trabalho-ativo .cronometro { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trabalho-ativo button, .trabalho-ativo .botao { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
.trabalho-ativo button:hover, .trabalho-ativo .botao:hover { background: rgba(255, 255, 255, .26); }

.pj-card { display: flex; flex-direction: column; gap: 12px; }
.pj-card h3 { font-size: 16px; }
.pj-card h3 a { color: var(--texto); }
.pj-card .descricao { color: var(--texto-2); font-size: 13px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-card .rodape { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pj-card.meu { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(1, 125, 229, .12); }

/* tela inicial do funcionario: os projetos dele, com Trabalhar em cada um */
.meus-projetos { list-style: none; margin: 0; padding: 0; }
.meus-projetos li { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-top: 1px solid var(--borda); }
.meus-projetos li:first-child { border-top: 0; padding-top: 4px; }
.meus-projetos li.atual { background: var(--verde-fundo); border-radius: 12px; padding: 14px; border-top-color: transparent; }
.meus-projetos li.atual + li { border-top-color: transparent; }
.mp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mp-nome { font-weight: 600; font-size: 15.5px; color: var(--texto); }
.mp-detalhes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.mp-info .progresso { max-width: 320px; }
.pulso-mini { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--verde); margin-right: 2px; animation: pulso 1.8s infinite; box-shadow: 0 0 0 0 rgba(22, 163, 90, .6); }
@media (max-width: 600px) {
  .meus-projetos li { flex-direction: column; align-items: stretch; gap: 10px; }
  .meus-projetos li form button { width: 100%; justify-content: center; }
}

/* parte dos cards que ja chegou na ultima coluna */
.progresso { height: 6px; border-radius: 999px; background: var(--borda); overflow: hidden; }
.progresso span { display: block; height: 100%; background: var(--azul); border-radius: inherit; }
.trilha-legenda { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--texto-2); margin-top: 6px; }
.trilha-legenda b { color: var(--texto); font-weight: 600; }

.pessoas { display: flex; flex-wrap: wrap; gap: 6px; }
.pessoa-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--verde-fundo); color: #0d6b3a; font-weight: 500;
}
.pessoa-chip .avatar { width: 22px; height: 22px; font-size: 11px; background: var(--verde); }
.pessoa-chip .tempo { font-variant-numeric: tabular-nums; opacity: .8; }

/* status do projeto: numeros + concluir */
.status-projeto { padding: 20px 22px; }
.status-linha { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.status-dados { display: flex; gap: 28px; flex-wrap: wrap; }
.status-dados .dado b { font-size: 15px; }
.status-dados .dado b .sutil { font-weight: 400; }

/* kanban: uma coluna por etapa do projeto */
/* kanban: uma coluna por etapa. Cabem sempre 4 na tela (--visiveis =
   min(etapas, 4), vem do PHP); com mais de 4, o resto fica pro lado e se
   chega nelas pelas setas (kanban.js), sem barra de rolagem. */
.kanban-caixa { position: relative; margin-bottom: 18px; --gap: 12px; }
.kanban {
  display: grid; gap: var(--gap); align-items: start;
  grid-template-columns: repeat(var(--colunas, 4), calc((100% - (var(--visiveis, 4) - 1) * var(--gap)) / var(--visiveis, 4)));
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.kanban::-webkit-scrollbar { display: none; }
.kanban > .coluna { scroll-snap-align: start; transform-origin: center top; }
.kanban.animando { scroll-snap-type: none; } /* o snap brigaria com a animacao do JS */
@media (max-width: 900px) {
  .kanban { grid-template-columns: repeat(var(--colunas, 4), 82%); }
}

/* degrade nas bordas avisando que tem mais coluna daquele lado */
.kanban-caixa::before, .kanban-caixa::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 14px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.kanban-caixa::before { left: 0; background: linear-gradient(90deg, rgba(1, 36, 63, .10), rgba(1, 36, 63, 0)); border-radius: var(--raio) 0 0 var(--raio); }
.kanban-caixa::after { right: 0; background: linear-gradient(-90deg, rgba(1, 36, 63, .10), rgba(1, 36, 63, 0)); border-radius: 0 var(--raio) var(--raio) 0; }
.kanban-caixa.tem-esq::before, .kanban-caixa.tem-dir::after { opacity: 1; }

.kanban-seta {
  position: absolute; top: calc(50% - 22px); z-index: 2; /* meio da coluna (44px de botao) */
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--superficie); color: var(--azul); border: 1px solid var(--borda);
  box-shadow: 0 6px 20px rgba(1, 36, 63, .18);
  opacity: 0; visibility: hidden; transform: scale(.6);
  transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1), visibility 0s linear .3s, background .15s, color .15s;
}
.kanban-seta.esq { left: -24px; }
.kanban-seta.dir { right: -24px; }
.kanban-seta .ic { width: 20px; height: 20px; transition: transform .2s ease; }
.tem-esq .kanban-seta.esq, .tem-dir .kanban-seta.dir {
  opacity: 1; visibility: visible; transform: scale(1);
  transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1), visibility 0s, background .15s, color .15s;
}
.kanban-seta:hover { background: var(--azul); color: #fff; transform: scale(1.08); }
.kanban-seta.esq:hover .ic { transform: translateX(-2px); }
.kanban-seta.dir:hover .ic { transform: translateX(2px); }
.kanban-seta:active { transform: scale(.94); }
/* "cutucada" na seta da direita quando a pagina abre, pra mostrar que tem mais */
.kanban-seta.dir.cutucar .ic { animation: cutucar 1.1s ease-in-out .5s 2; }
@keyframes cutucar { 0%, 100% { transform: none; } 40% { transform: translateX(5px); } 60% { transform: translateX(-1px); } }
@media (max-width: 900px) { .kanban-seta { display: none; } }
@media (prefers-reduced-motion: reduce) { .kanban-seta, .kanban-seta .ic, .kanban-caixa::before, .kanban-caixa::after { transition: none; animation: none !important; } }
.coluna {
  background: #dfe8f2; border: 1px solid #cfdcea; border-radius: var(--raio); padding: 12px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.coluna-topo { display: flex; align-items: center; gap: 6px; padding: 2px 2px 4px; }
.coluna-topo h3 { flex: 1; font-size: 15px; }
.coluna-topo .num { font-size: 12px; color: var(--texto-2); font-weight: 600; background: rgba(255, 255, 255, .7); padding: 2px 8px; border-radius: 999px; }
.coluna-topo[draggable="true"] { cursor: grab; border-radius: 8px; }
.coluna-topo[draggable="true"]:hover { background: rgba(255, 255, 255, .55); }
.coluna.arrastando { opacity: .45; outline: 2px dashed #9fb6cf; outline-offset: -2px; }
.coluna.ultima .coluna-topo .num { background: var(--verde-fundo); color: #0d6b3a; }

/* cards: a lista cresce ate ~6 cards e depois rola dentro da coluna */
.lista-cards { position: relative; }
.cards {
  list-style: none; margin: 0 -6px 0 0; padding: 0 6px 0 0; display: flex; flex-direction: column; gap: 8px;
  min-height: 64px; max-height: 560px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #c3d0df transparent;
}
.cards::-webkit-scrollbar { width: 6px; }
.cards::-webkit-scrollbar-thumb { background: #c3d0df; border-radius: 99px; }
.card {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  background: var(--superficie); border-radius: 10px; padding: 12px; border: 1px solid var(--borda);
  box-shadow: 0 1px 2px rgba(1, 36, 63, .04); font-size: 14.5px; line-height: 1.4;
  overflow-wrap: break-word; hyphens: auto;
}
.card[draggable="true"] { cursor: grab; transition: border-color .15s, box-shadow .15s; }
.card[draggable="true"]:hover { border-color: #b9cde3; box-shadow: 0 4px 12px rgba(1, 36, 63, .08); }
.card:focus-visible { outline: 2px solid var(--azul); outline-offset: 1px; }
.card.arrastando { opacity: .4; border-style: dashed; }
.card.salvando { opacity: .7; }
.card .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.card-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--texto-3); }
.card-rodape .tem-descricao .ic { width: 15px; height: 15px; display: block; }
.card-rodape .responsavel { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--texto-2); }
.card-rodape .avatar { width: 20px; height: 20px; font-size: 10.5px; }
.coluna.ultima .card .t { color: var(--texto-2); }
.cards .sem-cards {
  flex: none; padding: 18px 8px; text-align: center;
  border: 2px dashed #cfdbe8; border-radius: 10px; color: var(--texto-3); font-size: 13px;
}
.cards .sem-cards:not(:only-child) { display: none; }
/* degrade no pe avisando que tem mais card pra baixo */
.lista-cards::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 12px; pointer-events: none;
  background: linear-gradient(0deg, #dfe8f2, rgba(223, 232, 242, 0)); opacity: 0; transition: opacity .2s;
}
.lista-cards.tem-mais::after { opacity: 1; }

/* janela do card (editar / excluir) */
.card-dialogo {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 22px;
  border: 0; border-radius: var(--raio); background: var(--superficie); color: var(--texto);
  box-shadow: 0 20px 60px rgba(1, 36, 63, .3);
}
.card-dialogo::backdrop { background: rgba(1, 36, 63, .45); }
.card-dialogo h2 { margin: 0 0 14px; }
.card-dialogo .card-criado { margin: 0 0 14px; }
.card-dialogo .campos { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
/* periodos de trabalho: corrigir / apagar no fim da linha */
.tabela-periodos .acoes-linha { white-space: nowrap; text-align: right; }
.tabela-periodos .acoes-linha > * { display: inline-block; margin-left: 4px; }
.tabela-periodos .icone-so .ic { width: 15px; height: 15px; }
.card-dialogo .card-excluir { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--borda); display: block; }
.coluna form.linha { flex-wrap: nowrap; }
.coluna form.linha input { min-width: 0; padding: 9px 12px; font-size: 14px; background: transparent; border-style: dashed; }
.coluna form.linha input:focus { background: #fff; border-style: solid; }
.coluna form.linha button { background: transparent; color: var(--azul); border: 1px dashed #b9cde3; }
.coluna form.linha button:hover { background: #fff; }
.coluna details { margin-top: auto; }
.coluna-acoes { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.kanban-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kanban-topo form.linha { flex: 0 1 380px; }

/* pagina do projeto usa a largura toda (o kanban precisa de espaco) */
.largo .conteudo { max-width: none; }

.linha-tempo { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.linha-tempo li { position: relative; padding: 0 0 14px 20px; font-size: 13.5px; }
.linha-tempo li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--azul); }
.linha-tempo li::after { content: ''; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--borda); }
.linha-tempo li:last-child::after { display: none; }

/* ---------- blog ---------- */
.blog-item { display: flex; align-items: center; gap: 14px; }
.blog-item .thumb { width: 96px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--fundo); flex: none; }
.blog-item .info { flex: 1; min-width: 0; }
.blog-item .info b { display: block; }
.bloco { position: relative; border: 1px dashed #c6d3e2; border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fbfcfe; }
.bloco .remover { position: absolute; top: 10px; right: 10px; }
.estrelas { color: #f5b301; letter-spacing: 2px; }

/* ---------- estatisticas ---------- */
.filtro-periodo select { width: auto; min-width: 170px; padding: 9px 12px; }

/* colunas: horas por dia (ou mes). Dica no hover/foco via data-dica. */
.grafico-colunas { display: flex; gap: 10px; height: 220px; }
.gc-eixo { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 22px; font-size: 11.5px; color: var(--texto-3); text-align: right; white-space: nowrap; }
.gc-barras {
  flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px;
  background: linear-gradient(var(--borda), var(--borda)) bottom 22px left 0 / 100% 1px no-repeat,
              linear-gradient(var(--fundo), var(--fundo)) top 0 left 0 / 100% 1px no-repeat;
}
.gc-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; outline: none; cursor: default; }
.gc-col span { display: block; width: 100%; max-width: 28px; background: var(--azul); border-radius: 4px 4px 0 0; margin-bottom: 22px; transition: background .15s; }
.gc-col small { position: absolute; bottom: 0; font-size: 11px; color: var(--texto-3); white-space: nowrap; }
.gc-col:hover span, .gc-col:focus-visible span { background: var(--azul-escuro); }
.gc-col::before { content: ''; position: absolute; inset: 0 0 22px; border-radius: 6px; }
.gc-col:hover::before, .gc-col:focus-visible::before { background: rgba(1, 125, 229, .06); }
.gc-col:hover::after, .gc-col:focus-visible::after {
  content: attr(data-dica); position: absolute; bottom: calc(100% - 16px); left: 50%; transform: translateX(-50%); z-index: 3;
  background: var(--marinho); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; box-shadow: var(--sombra); pointer-events: none;
}
.gc-col:first-child::after { left: 0; transform: none; }
.gc-col:last-child::after { left: auto; right: 0; transform: none; }

/* barras horizontais: horas por projeto */
.barras-h { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.duas-col > * { min-width: 0; }
.bh-topo { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 5px; }
.bh-topo a { color: var(--texto); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-valor { margin-left: auto; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bh-valor .sutil { font-weight: 400; }
.bh-trilho, .mini-barra { height: 8px; border-radius: 999px; background: var(--fundo); overflow: hidden; }
.bh-trilho span, .mini-barra span { display: block; height: 100%; min-width: 4px; background: var(--azul); border-radius: inherit; }

.tabela-equipe td { vertical-align: middle; }
.tabela-equipe .num, .tabela-equipe th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pessoa-link { display: inline-flex; align-items: center; gap: 10px; color: var(--texto); font-weight: 500; }
.pessoa-link .avatar { width: 30px; height: 30px; font-size: 13px; }
.col-horas { min-width: 180px; white-space: nowrap; }
.col-horas .mini-barra { display: inline-block; vertical-align: middle; width: 90px; height: 6px; margin-right: 8px; }
.col-horas b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.tabela-equipe .etiqueta { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- valor por hora (usuarios) e abas do dashboard ---------- */
form.valor-hora { max-width: 360px; margin-top: 10px; }
form.valor-hora label { margin: 0; white-space: nowrap; }
form.valor-hora input { max-width: 130px; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 20px; overflow-x: auto; }
.abas a { padding: 10px 16px; color: var(--texto-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.abas a:hover { color: var(--azul-escuro); }
.abas a.ativa { color: var(--azul-escuro); border-bottom-color: var(--azul); }
.numero.custo b { color: var(--azul-escuro); }
.seletor-projeto select { min-width: 260px; }

/* banco de dados */
.numero b .etiqueta { font-size: 14px; vertical-align: middle; }
.tabela-log td { vertical-align: top; }
.tabela-log .quando { white-space: nowrap; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.log-msg { word-break: break-word; }
.log-detalhe {
  display: block; margin: 6px 0 2px; padding: 6px 8px; border-radius: 6px; background: var(--fundo);
  font-size: 12px; color: var(--texto-2); white-space: pre-wrap; word-break: break-all;
}
