* { box-sizing: border-box; }
body { margin: 0; background: #f3f3f3; color: #222; font: 16px/1.45 "Source Sans 3", "Segoe UI", sans-serif; }
a { color: #b35d0e; font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
.caixa { width: min(1152px, calc(100% - 40px)); margin: 0 auto; }
.topo { background: #fff; border-bottom: 1px solid #e5e5e5; }
.topo-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.marca { display: flex; align-items: center; gap: 12px; color: #333; font-size: 14px; }
.marca a { color: inherit; font-weight: 400; text-decoration: none; }
.marca img { height: 64px; width: auto; display: block; }
.sair { color: #d10f1a; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.topo nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.topo nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 6px; color: #444; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.topo nav a.ativo { outline: 2px solid #d10f1a; border-radius: 2px; }
.submenu { background: #b10d16; }
.submenu .caixa { display: flex; gap: 4px; }
.submenu a { color: #fff; font-weight: 700; font-size: 14px; padding: 8px 16px; text-decoration: none; }
.submenu a.on, .submenu a:hover { background: #e10600; text-decoration: none; }
main { padding: 16px 0 40px; }
.barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #e10600; color: #fff; padding: 8px 16px; margin-bottom: 8px; }
.barra h1, .barra h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 0 0 16px; color: #555; font-size: 14px; }
.btn, button.btn { display: inline-block; border: 0; border-radius: 2px; background: #2f9e44; color: #fff; font: 600 14px/1 "Source Sans 3", sans-serif; padding: 8px 16px; cursor: pointer; text-decoration: none; }
.btn:hover, button.btn:hover { background: #27853a; text-decoration: none; }
.btn.linha { background: transparent; border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn.linha:hover { background: rgba(255,255,255,.1); }
.btn.vermelho { background: #e10600; }
.painel { background: #fff; border: 1px solid #d5d5d5; box-shadow: 0 1px 2px rgba(0,0,0,.04); margin-bottom: 16px; }
.campo { display: block; margin-bottom: 14px; }
.campo, .painel p { font-size: 14px; }
label.campo { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5a6478; }
.campo input, .campo select, .campo textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid #c8c8c8; border-radius: 2px; background: #fff; padding: 8px 12px; font: 14px/1.4 "Source Sans 3", sans-serif; color: #222; text-transform: none; letter-spacing: 0; font-weight: 400; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid rgba(225,6,0,.3); }
.grelha { display: grid; gap: 12px; }
@media (min-width: 800px) { .grelha-2 { grid-template-columns: 1fr 1fr; } }
.aviso { font-weight: 700; font-size: 14px; }
.aviso.ok { color: #2f9e44; }
.aviso.erro { color: #e10600; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d5d5d5; margin-bottom: 16px; }
th, td { padding: 8px 12px; text-align: left; font-size: 14px; font-weight: 400; }
th { background: #e6e6e6; border-bottom: 1px solid #cfcfcf; font-size: 12px; font-weight: 700; color: #333; text-transform: none; letter-spacing: 0; }
td { border-bottom: 1px solid rgba(18,21,26,.08); }
.estado { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #e2e6ec; color: #2a3140; }
.estado.curso { background: rgba(251,191,36,.4); color: #8a4a12; }
.estado.feito { background: rgba(107,143,173,.2); color: #3d5a73; }
.login { min-height: 100vh; display: grid; place-items: center; background: #2c3444; }
.login .cartao { width: min(360px, calc(100% - 32px)); text-align: center; color: #c5ced8; }
.login .logo { display: inline-block; background: #fff; border-radius: 6px; padding: 8px 16px; }
.login img { height: 80px; }
.login form { text-align: left; margin-top: 24px; }
.login select, .login input { width: 100%; height: 48px; border: 0; border-radius: 6px; background: #e7eef6; padding: 0 12px; margin-bottom: 12px; font: 14px "Source Sans 3", sans-serif; }
.login button { width: 100%; height: 48px; border: 0; border-radius: 6px; background: #e10600; color: #fff; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.agenda-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.agenda-topo h2 { margin: 0; font-size: 24px; font-weight: 600; }
.agenda-topo p { margin: 0; color: #666; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.pill, .setas { border: 1px solid #d0d0d0; border-radius: 999px; background: #fff; color: #333; font-weight: 400; text-decoration: none; }
.pill { padding: 6px 12px; font-size: 14px; }
.setas { display: flex; overflow: hidden; }
.setas a { padding: 6px 12px; color: #333; font-weight: 400; text-decoration: none; }
.setas a + a { border-left: 1px solid #d0d0d0; }
.calendario { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid #e5e5e5; border-left: 1px solid #e5e5e5; }
.calendario .sem { min-height: 0; padding: 8px; text-align: center; font-size: 12px; color: #888; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; background: #fff; }
.calendario .sem.fim { background: #f7f7f7; }
.calendario a { min-height: 104px; padding: 4px; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; color: #444; font-weight: 400; text-decoration: none; background: #fff; }
.calendario a:hover { background: #f4f8ff; text-decoration: none; }
.calendario a span { display: block; padding: 0 4px; font-size: 12px; }
.calendario a.fim { background: #f7f7f7; }
.calendario a.fora { background: #f3f3f3; }
.calendario a.fora span { color: #b5b5b5; }
.calendario a.hoje-cal { background: #fff6cc; }
.calendario em { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 2px; background: #d8b4fe; color: #581c87; font-style: normal; font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendario em.feito, .chip.feito { background: #4ade80; color: #14532d; }
.calendario i.mais { display: block; margin-top: 4px; padding: 0 4px; color: #888; font-style: normal; font-size: 11px; }
.filtro-agenda { border-top: 1px solid #e5e5e5; padding: 8px; }
.filtro-agenda select { width: 100%; border: 1px solid #d5d5d5; background: #fff; padding: 8px 12px; font: 14px "Source Sans 3", sans-serif; color: #333; }
.modal-fundo { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-sair { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal { position: relative; z-index: 1; width: min(32rem, 100%); max-height: 90vh; overflow: auto; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.modal-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eee; padding: 12px 16px; }
.modal-topo h3 { margin: 0; font-size: 18px; font-weight: 600; text-transform: capitalize; color: #222; }
.modal-topo p { margin: 0; color: #666; font-size: 14px; }
.modal-fechar { color: #666; font-size: 24px; font-weight: 400; line-height: 1; text-decoration: none; padding: 0 8px; }
.modal-fechar:hover { color: #e10600; text-decoration: none; }
.lista-marca { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #eee; }
.lista-marca li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; }
.lista-marca p { flex: 1; min-width: 140px; margin: 0; font-size: 14px; }
.lista-marca form { margin: 0; }
.chip { display: inline-block; padding: 2px 6px; border-radius: 2px; background: #d8b4fe; color: #581c87; font-size: 12px; font-weight: 600; }
.suave { color: #777; }
.link-concluir, .link-cancelar { border: 0; background: none; font: 600 14px "Source Sans 3", sans-serif; cursor: pointer; padding: 0; }
.link-concluir { color: #2f9e44; }
.link-cancelar { color: #888; }
.link-cancelar:hover { color: #e10600; }
.form-novo { max-width: 42rem; padding: 24px; }
.form-novo .grelha { gap: 16px; }
.form-novo .campo { margin: 0; }
.form-novo .largo { grid-column: 1 / -1; }
.seccao-form { grid-column: 1 / -1; margin-top: 8px; border-top: 1px solid #e4e4e4; padding-top: 16px; }
.seccao-form p { margin: 0; }
.seccao-form strong { font-size: 14px; color: #222; }
.seccao-form .nota { color: #666; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.form-novo .aviso { margin: 0 0 16px; }
.form-marca { display: grid; gap: 12px; padding: 16px; }
.form-marca label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #666; }
.form-marca input, .form-marca select { display: block; width: 100%; margin-top: 4px; border: 1px solid #c8c8c8; border-radius: 2px; background: #fff; padding: 8px; font: 14px/1.4 "Source Sans 3", sans-serif; color: #222; text-transform: none; letter-spacing: 0; font-weight: 400; }
.botoes-marca { display: flex; gap: 8px; padding-top: 4px; }
.btn.contorno { background: #fff; color: #333; border: 1px solid #ccc; }
.btn.contorno:hover { background: #fff; border-color: #999; }
table.lista td.forte { font-weight: 600; color: #12151a; }
table.lista td.matricula { font-weight: 600; letter-spacing: .04em; }
table.lista td.acoes { text-align: right; white-space: nowrap; }
a.abrir { color: #b35d0e; }
a.editar { color: #b10d16; margin-left: 12px; }
.ficha-painel { padding: 24px; }
.ficha-painel h3 { margin: 0 0 16px; font-size: 20px; }
.detalhe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.detalhe dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7a8496; }
.detalhe dd { margin: 4px 0 0; font-size: 14px; }
.linha-viatura { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(18,21,26,.1); }
.linha-viatura p { margin: 0; color: #5a6478; font-size: 14px; }
.folha { background: #fff; border: 1px solid #cfcfcf; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.folha-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; background: #e10600; color: #fff; padding: 12px 16px; }
.folha-topo p { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.folha-topo h2 { margin: 0; font-size: 28px; line-height: 1; }
.acoes-folha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acoes-folha form { margin: 0; }
.folha-topo .btn.branco, .btn.branco { background: #fff; color: #222; }
.btn.branco:hover { background: #f6f6f6; }
.btn.branco.escuro { border: 1px solid #ccc; }
.folha-partes { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #e4e4e4; }
.folha-partes section { padding: 12px 16px; }
.folha-partes section + section { border-left: 1px solid #e4e4e4; }
.folha-partes .rotulo { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #888; }
.folha-partes strong { display: block; margin-top: 4px; font-size: 16px; }
.folha-partes p { margin: 2px 0; color: #444; font-size: 14px; }
.folha-comandos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: #fafafa; border-bottom: 1px solid #e4e4e4; padding: 12px 16px; }
.folha-obs { margin: 0; border-bottom: 1px solid #e4e4e4; padding: 8px 16px; color: #555; font-size: 14px; }
tr.vazia td { height: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.folha-comandos label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #666; }
.folha-comandos input, .folha-comandos select { display: block; width: 100%; margin-top: 4px; border: 1px solid #c8c8c8; padding: 6px 8px; font: 14px "Source Sans 3", sans-serif; text-transform: none; font-weight: 400; }
.folha-scroll { overflow-x: auto; }
table.folha-linhas { margin: 0; border: 0; min-width: 760px; border-collapse: collapse; }
table.folha-linhas th, table.folha-linhas td { border: 1px solid #e4e4e4; padding: 6px 8px; font-size: 14px; background: #fff; }
table.folha-linhas th { background: #e6e6e6; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #333; }
table.folha-linhas td.dir, table.folha-linhas th.dir { text-align: right; font-variant-numeric: tabular-nums; }
table.folha-linhas td.cod { font-family: Consolas, ui-monospace, monospace; font-size: 12px; }
table.folha-linhas td.forte { font-weight: 600; }
table.folha-linhas .c-cod { width: 7rem; }
table.folha-linhas .c-qtd { width: 5rem; }
table.folha-linhas .c-preco { width: 7rem; }
table.folha-linhas .c-iva { width: 4rem; }
table.folha-linhas .c-pintor { width: 7rem; }
table.folha-linhas .c-acao { width: 5.5rem; }
tr.linha-nova td { background: #fffdf6; padding: 4px; }
tr.linha-nova input, tr.linha-nova select { width: 100%; border: 0; background: transparent; padding: 4px; font: 14px "Source Sans 3", sans-serif; color: #222; }
tr.linha-nova input.dir { text-align: right; }
tr.linha-nova input:focus, tr.linha-nova select:focus { outline: 1px solid #e10600; background: #fff; }
td.mudo { color: #888; }
.btn.mini { width: 100%; padding: 4px 8px; font-size: 12px; }
.horas-fixas { margin: 4px 0 0; border: 1px solid #e0e0e0; background: #f3f3f3; padding: 6px 8px; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #222; }
.rotulo-campo { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #666; }
a.origem { color: #b10d16; }
.escondido, .so-pdf { display: none; }
@media print {
  .so-pdf { display: block; }
  .so-ecra { display: none !important; }
}
.fotos-sec { border-top: 1px solid #e4e4e4; padding: 16px; }
.fotos-sec h3 { margin: 0; font-size: 14px; }
.fotos-sec .nota { margin: 0 0 12px; color: #666; font-size: 14px; }
.link-remover { border: 0; background: none; color: #888; font-weight: 700; cursor: pointer; padding: 0; }
.link-remover:hover { color: #e10600; }
.totais { display: flex; justify-content: flex-end; padding: 16px; border-top: 1px solid #e4e4e4; }
.totais dl { width: min(320px, 100%); margin: 0; }
.totais div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eee; color: #666; }
.totais .total { border: 0; color: #222; font-size: 16px; font-weight: 700; }
.fotos { display: flex; flex-wrap: wrap; gap: 8px; }
.fotos img { width: 120px; height: 90px; object-fit: cover; }
@media print {
  .no-print { display: none !important; }
  body, .painel, table { background: #fff; box-shadow: none; }
  .caixa { width: auto; }
}
