:root {
  font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173052; background: #f1f5fa; color-scheme: light;
  --marinho: #16376e; --azul: #244f98; --texto: #173052; --suave: #506582;
  --borda: #d6e2f0; --fundo: #eff5fc; --branco: #fff; --verde: #17675a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-inline-size: 300px; }
a { color: var(--azul); text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid #428cd6; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.19; letter-spacing: -.025em; color: var(--marinho); overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
h2 { font-size: clamp(1.22rem, 2vw, 1.55rem); }
h3 { font-size: 1.05rem; }
p, dd, li, td { overflow-wrap: anywhere; }
small { color: var(--suave); font-size: .86rem; }
.atalho { position: fixed; z-index: 10; left: 16px; top: -100px; padding: 10px; background: white; }
.atalho:focus { top: 12px; }
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  color: var(--marinho); background: white; border: 1px solid #bdcfe8; border-radius: 9px;
  min-height: 44px; padding: 9px 14px; font-weight: 650; cursor: pointer; font-size: .92rem; text-align: center;
}
.botao:hover { background: #eff5fd; border-color: var(--azul); }
.primario { color: white; border-color: var(--azul); background: var(--azul); }
.primario:hover { background: var(--marinho); }
.discreto { background: transparent; }
.botao:disabled { cursor: default; opacity: .49; }
.botoes, .linha { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.justificar { justify-content: space-between; }
.espaco { display: grid; align-content: start; gap: 13px; min-width: 0; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 14px; }
.selo { display: inline-flex; align-items: center; border-radius: 6px; padding: 3px 8px; background: #eaf1fb; color: #264f8a; font-size: .8rem; font-weight: 700; }
.selo.verde { background: #dff4eb; color: #146052; }
.selo.ambar { background: #fff0d7; color: #725009; }
.selo.cinza { background: #eef1f5; color: #455774; }
.caixa, .bloco { padding: clamp(16px, 2.6vw, 24px); background: white; border: 1px solid var(--borda); border-radius: 14px; display: grid; gap: 15px; align-content: start; min-width: 0; }
.caixa .caixa { box-shadow: none; }
.subcaixa { background: #f6f9fd; }
.vazio { padding: 20px 15px; color: var(--suave); border-radius: 9px; background: #f2f6fb; font-size: .94rem; }
.tabela { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: 12px 11px; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { background: #f0f5fb; color: var(--marinho); font-size: .84rem; white-space: nowrap; }
td { font-size: .93rem; }
tr:last-child td { border-bottom: 0; }
dt { font-weight: 650; color: var(--suave); font-size: .85rem; }
dd { margin: 3px 0 0; }
dl { display: grid; gap: 10px 20px; margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr)); }
.figuras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 10px; }
.figura { display: grid; gap: 4px; border: 1px solid var(--borda); background: #f5f8fd; padding: 14px; border-radius: 10px; }
.figura strong { font-size: 1.6rem; color: var(--marinho); line-height: 1.15; }
.figura span { font-size: .85rem; color: var(--suave); }
.formulario { display: grid; align-content: start; gap: 12px; }
.campo { display: grid; gap: 5px; min-width: 0; color: var(--marinho); font-size: .92rem; font-weight: 650; }
.campo input, .campo textarea, .campo select { border: 1px solid #bfcfe5; width: 100%; background: white; color: var(--texto); border-radius: 8px; padding: 9px 11px; font-weight: 400; min-height: 44px; }
.campo textarea { resize: vertical; min-height: 84px; }
.campo input[readonly] { background: #f1f5fa; }
.erro-form { color: #902727; background: #fff0f1; border: 1px solid #f0c9cc; border-radius: 8px; padding: 10px; }
.aviso { position: fixed; z-index: 5; bottom: 12px; right: 12px; width: max-content; max-width: min(500px, calc(100vw - 26px)); padding: 14px 17px; border-radius: 9px; color: white; background: #153564; box-shadow: 0 12px 25px #05264d38; }
.aviso.erro { background: #852b30; }
dialog { padding: 0; width: min(calc(100% - 24px), 880px); max-width: none; max-height: min(88vh, 850px); border-radius: 15px; border: 1px solid var(--borda); background: white; color: var(--texto); box-shadow: 0 20px 80px #0c285042; }
dialog::backdrop { background: #132e59b0; }
dialog > :not(.modal-topo) { margin: 16px clamp(14px, 3vw, 27px) 25px; }
.modal-topo { display: flex; gap: 10px; align-items: center; justify-content: space-between; position: sticky; top: 0; padding: 15px clamp(14px, 3vw, 27px); background: white; border-bottom: 1px solid var(--borda); z-index: 1; }
.modal-topo h2 { font-size: clamp(1.12rem, 3vw, 1.62rem); }
dialog video { display: block; width: 100%; max-height: 45vh; border-radius: 10px; background: #132e59; }
.login { min-height: 100svh; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-apresenta { background: radial-gradient(ellipse at 3% 6%, #3260a8, transparent 55%), linear-gradient(147deg, #214d90, #122e59); color: white; display: grid; align-content: center; padding: clamp(28px, 7vw, 104px); gap: 18px; }
.login-apresenta h1 { color: white; font-size: clamp(2rem, 6vw, 4.15rem); }
.login-apresenta p { max-width: 36ch; color: #e2ebf8; font-size: 1.12rem; }
.login-apresenta .marca-piloto { font-size: 1rem; color: #c4dbf2; font-weight: 700; }
.login-form { display: grid; place-items: center; padding: clamp(20px, 5vw, 68px); }
.login-form > .caixa { width: min(440px, 100%); padding: clamp(20px, 4vw, 36px); box-shadow: 0 12px 48px #112f5210; }
.logo { display: block; width: 151px; height: auto; object-fit: contain; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 222px minmax(0, 1fr); }
.app-bar { background: white; padding: 16px clamp(15px, 4vw, 38px); border-bottom: 1px solid var(--borda); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side { position: sticky; top: 0; align-self: start; min-height: 100vh; height: 100vh; overflow: auto; background: var(--marinho); color: #e5eef9; padding: 24px 13px; display: grid; align-content: start; gap: 26px; }
.nome-app { margin: 0 7px; color: white; font-size: 1.32rem; font-weight: 750; letter-spacing: -.025em; }
.side nav { display: grid; gap: 5px; }
.nav-link { color: #e1eaf7; padding: 10px 12px; border-radius: 8px; font-size: .93rem; text-decoration: none; font-weight: 600; }
.nav-link:hover, .nav-link[aria-current="page"] { background: #315d9e; color: white; }
.conteudo { max-width: 1475px; margin: 0 auto; padding: clamp(16px, 3.4vw, 38px); display: grid; gap: 17px; }
.cabeca { padding: clamp(17px, 3vw, 30px); border-radius: 14px; background: linear-gradient(103deg, #17376d, #2b5599); display: grid; gap: 8px; }
.cabeca h1 { color: white; }
.cabeca p { color: #e0edf9; }
.filtros, .abas { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.filtros .campo { flex: 1 1 235px; }
.abas { align-items: center; border-bottom: 1px solid var(--borda); padding-bottom: 10px; }
.abas .botao[aria-current="page"] { background: #deecfd; border-color: #9bbce7; }
.paginacao { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--suave); font-size: .89rem; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 7px; }
.kanban-coluna { border: 1px solid var(--borda); border-top: 3px solid var(--azul); border-radius: 10px; background: #f0f5fa; padding: 11px; display: grid; align-content: start; gap: 9px; min-width: 0; }
.kanban-coluna .cartao { padding: 10px; border-radius: 8px; background: white; border: 1px solid var(--borda); display: grid; gap: 4px; }
.registro { padding: 12px 14px; border: 1px solid var(--borda); border-radius: 9px; display: grid; gap: 5px; min-width: 0; }
.registro:nth-of-type(even) { background: #fafcff; }
.linhas { display: grid; gap: 8px; }
.legado-texto, .texto-livre { white-space: pre-wrap; line-height: 1.65; }
.origem { color: var(--suave); font-size: .83rem; font-weight: 600; }
.na-mesma-linha { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.trilha { border: 1px solid #c2d5ee; border-radius: 11px; overflow: clip; }
.trilha > summary, .editor-tarefa > summary { padding: 12px; cursor: pointer; color: var(--marinho); background: #eff5fc; font-weight: 700; }
.trilha > div, .editor-tarefa > div { padding: 12px; }
.tarefa { padding: 10px 0; border-bottom: 1px solid var(--borda); }
.tarefa:last-child { border-bottom: 0; }
.tarefa-nome { color: var(--marinho); font-weight: 700; }
.editor-tarefa { border: 1px solid var(--borda); border-radius: 9px; overflow: clip; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; min-height: 0; height: auto; padding: 13px; gap: 10px; overflow: visible; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-link { font-size: .88rem; padding: 8px; }
  .login { grid-template-columns: 1fr; align-content: start; }
  .login-apresenta { padding: 36px 22px; }
  .login-form { padding: 18px 12px 30px; }
}
@media (max-width: 480px) {
  .app-bar .logo { width: 113px; }
  .app-bar strong { font-size: .85rem; }
  .app-bar small { display: none; }
  .formulario input, .formulario textarea, .formulario select { font-size: 16px; }
}

.gantt-trilho { height: 10px; border-radius: 5px; background: #eaf0f8; position: relative; overflow: hidden; }
.gantt-trilho span { position: absolute; top: 0; bottom: 0; left: var(--inicio, 0%); width: var(--largura, 0%); min-width: 3px; border-radius: 5px; background: #4d82c9; }
fieldset { min-width: 0; }
legend { color: var(--marinho); font-weight: 700; padding-inline: 6px; }
