:root {
  --navy: #00284A; --navy-2: #0B3A63; --navy-soft: #E6EDF4;
  --teal: #0CC6A2; --teal-2: #0AB392; --teal-ink: #087F68; --teal-soft: #E2F8F3;
  --bg: #F4F7F9; --surface: #FFFFFF; --ink: #0B1F33; --ink-2: #263A4E; --muted: #5B6B7B;
  --line: #E2E8EE; --line-2: #EEF2F5;
  --ok: #1C6B3A; --ok-bg: #E4F3EA; --warn: #8A3F00; --warn-bg: #FFF1DC; --err: #8A2E12; --err-bg: #FBE6DF;
  --radius: 18px; --radius-sm: 12px;
  --sombra: 0 1px 2px rgba(0,40,74,.04), 0 10px 28px -16px rgba(0,40,74,.18);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ondas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 200' preserveAspectRatio='none'%3E%3Cpath d='M0 70c80-30 160 30 240 0s160-30 240 0 120 20 160 0' fill='none' stroke='%230CC6A2' stroke-width='22' opacity='.95'/%3E%3Cpath d='M0 120c80-30 160 30 240 0s160-30 240 0 120 20 160 0' fill='none' stroke='%230CC6A2' stroke-width='22' opacity='.6'/%3E%3Cpath d='M0 170c80-30 160 30 240 0s160-30 240 0 120 20 160 0' fill='none' stroke='%230CC6A2' stroke-width='22' opacity='.3'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: var(--teal-ink); } a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, h3 { color: var(--navy); letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 26px; font-weight: 700; } h2 { font-size: 18px; font-weight: 600; } h3 { font-size: 16px; font-weight: 600; }
small, .muted { color: var(--muted); }

.shell { display: flex; min-height: 100vh; }
.menu { width: 264px; flex: none; background: var(--navy); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background-image: var(--ondas); background-repeat: no-repeat; background-position: left bottom; background-size: 100% 130px; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 20px; }
.logo { height: 40px; width: auto; align-self: flex-start; }
.logo-txt { font-weight: 300; font-size: 20px; letter-spacing: .02em; color: var(--teal); } .logo-txt b { color: #fff; font-weight: 800; }
.brand small { color: #9FB6CB; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.menu nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu nav a { color: #D6E2EC; text-decoration: none; padding: 11px 12px; border-radius: 10px; min-height: 44px; display: flex; align-items: center; font-weight: 500; }
.menu nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu nav a.on { background: var(--teal); color: var(--navy); font-weight: 600; }
.grp { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: #9FB6CB; margin: 18px 12px 6px; font-weight: 600; }
.who { font-size: 13.5px; padding: 12px 10px 70px; color: #fff; } .who small { color: #9FB6CB; }
.who form { margin-top: 8px; }
main { flex: 1; min-width: 0; }
.barra { display: none; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); height: 61px; }
.conteudo { max-width: 1200px; margin: 0 auto; padding: 28px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--sombra); margin-bottom: 18px; }
.card.faixa { border-top: 5px solid var(--teal); }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi .num { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.kpi .rot { font-size: 13px; color: var(--muted); } .kpi .var { font-size: 12.5px; color: var(--muted); }
.duas { display: flex; flex-wrap: wrap; gap: 18px; } .duas > .p { flex: 999 1 520px; min-width: 0; } .duas > .s { flex: 1 1 300px; min-width: 0; }
.hero { background: var(--navy); color: #fff; border-radius: 22px; padding: 30px 32px 56px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -10px; bottom: -6px; width: 46%; height: 110px; background: var(--ondas) no-repeat right bottom / 100% 100%; pointer-events: none; }
.hero h1 { color: #fff; margin-bottom: 6px; } .hero p { margin: 0; color: #D6E2EC; max-width: 60ch; } .hero .sobre { color: var(--teal); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 22px; border-radius: var(--radius-sm); border: 0; font: 600 15px var(--font); cursor: pointer; text-decoration: none; background: var(--navy); color: #fff; transition: .15s; }
.btn:hover { background: var(--navy-2); color: #fff; } .btn:active { transform: translateY(1px); }
.btn.dest { background: var(--teal); color: var(--navy); box-shadow: 0 8px 20px -10px rgba(12,198,162,.8); font-weight: 700; } .btn.dest:hover { background: var(--teal-2); color: var(--navy); }
.btn.sec { background: #fff; color: var(--navy); border: 1.5px solid #C6D2DC; } .btn.sec:hover { border-color: var(--navy); background: #fff; color: var(--navy); }
.btn.leve { background: var(--teal-soft); color: var(--navy); } .btn.leve:hover { background: #cff3ea; color: var(--navy); }
.btn.perigo { background: #fff; color: var(--err); border: 1.5px solid #E7B8A8; } .btn.perigo:hover { background: var(--err-bg); color: var(--err); }
.btn.peq { min-height: 44px; padding: 0 16px; font-size: 14px; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid #D3DCE4; border-radius: var(--radius-sm); font: 400 15px var(--font); color: var(--ink); background: #fff; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(12,198,162,.18); }
.campo { margin-bottom: 14px; }
.linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.ajuda { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.aviso { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; border: 1px solid; }
.aviso.ok { background: var(--teal-soft); border-color: #9FE3D4; color: #05463A; } .aviso.erro { background: var(--err-bg); border-color: #E7B8A8; color: var(--err); }
.aviso.atencao { background: var(--warn-bg); border-color: #F0D2A0; color: var(--warn); }

.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; background: var(--navy); color: #fff; padding: 10px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.tabela th:first-child { border-radius: 10px 0 0 0; } .tabela th:last-child { border-radius: 0 10px 0 0; }
.tabela td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; } .tabela tr:nth-child(even) td { background: #F9FBFC; }
.rolagem { overflow-x: auto; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-ink); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.chip.st-ideia { background: var(--navy-soft); color: var(--ink-2); } .chip.st-roteiro, .chip.st-producao { background: #E8EEF9; color: #1F3F7A; }
.chip.st-aprovacao { background: var(--warn-bg); color: var(--warn); } .chip.st-aprovado { background: var(--ok-bg); color: var(--ok); }
.chip.st-publicado { background: var(--navy); color: #fff; } .chip.st-descartado { background: var(--err-bg); color: var(--err); }
.chip.api { background: #fff; border: 1px solid #C6D2DC; color: var(--ink-2); }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; }
.cal .dia { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 108px; padding: 6px; }
.cal .dia.fora { background: transparent; border-style: dashed; opacity: .6; } .cal .dia.hoje { border: 2px solid var(--teal); }
.cal .num { font-size: 12.5px; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; }
.cal .num a { font-weight: 500; font-size: 12px; min-height: 24px; }
.item { display: block; font-size: 12px; line-height: 1.3; padding: 4px 6px; margin-top: 4px; border-radius: 8px; text-decoration: none; background: var(--navy-soft); color: var(--navy); border-left: 4px solid var(--navy); }
.item.st-aprovado { border-left-color: var(--ok); background: var(--ok-bg); } .item.st-aprovacao { border-left-color: var(--warn); background: var(--warn-bg); }
.item.st-publicado { background: var(--navy); color: #fff; border-left-color: var(--teal); } .item.st-descartado { opacity: .5; text-decoration: line-through; }
.item b { display: block; font-weight: 600; }

.hist { list-style: none; padding: 0; margin: 0; font-size: 13.5px; } .hist li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
pre.prompt, textarea.prompt { font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; min-height: 280px; background: #F9FBFC; }
details.card summary { cursor: pointer; font-weight: 600; color: var(--navy); min-height: 44px; display: flex; align-items: center; }
.login { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.login .card { border-top: 5px solid var(--teal); }
.nota-ok { color: var(--ok); font-weight: 600; } .nota-baixa { color: var(--err); font-weight: 600; }
canvas { max-width: 100%; }

@media (max-width: 760px) {
  .menu { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: .2s; } .menu.aberto { transform: none; }
  .barra { display: flex; } .conteudo { padding: 16px; }
  .cal { grid-template-columns: 1fr; } .cal .dow { display: none; } .cal .dia.fora { display: none; } .cal .dia { min-height: 0; }
  .hero { padding: 24px 20px 60px; }
}
