/* Layout: brand header + sticky tab rail; each tab is a stacked set of panels on a navy field. Single dark look, chosen for the Atto creative universe. */
:root {
  --bg: #061636; --bg-2: #0d2d6b; --panel: rgba(255,255,255,.055); --panel-2: rgba(255,255,255,.09); --line: rgba(255,255,255,.13); --line-2: rgba(255,255,255,.26);
  --fg: #f4f7ff; --muted: #a8b6d6; --dim: #7d8db3;
  --yellow: #f2c21b; --green: #7dc95e; --cyan: #4fc3f7; --orange: #ff9b6a;
  --ok: #8fe06a; --bad: #ff7a7a;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --r: 12px; --r-sm: 8px; --gap: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.sky { background: radial-gradient(130% 70% at 50% -10%, #1a4aa6 0%, var(--bg-2) 38%, var(--bg) 100%); }
.wrap { max-width: 1480px; margin: 0 auto; padding-inline: clamp(16px, 3.5vw, 44px); }
.hdr { padding-block: 34px 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.brand i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 16px 0 0 var(--yellow); margin-right: 16px; }
h1 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(34px, 4.6vw, 58px); line-height: .95; margin: 0; text-wrap: balance; }
h1 small { display: block; font-weight: 400; font-size: .42em; letter-spacing: .14em; color: var(--yellow); margin-top: 8px; }
.ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ctl label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
select { font: inherit; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 36px 8px 14px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { color: #000; }
nav.rail { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(6,22,54,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav.rail .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.rail button { flex: none; font: inherit; font-family: var(--display); font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 14px 14px 11px; cursor: pointer; }
nav.rail button:hover { color: var(--fg); }
nav.rail button.on { color: var(--yellow); border-bottom-color: var(--yellow); }
nav.rail button:focus-visible, .mbar button:focus-visible, .cr:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
main { padding-block: 26px 70px; }
section.pg[hidden] { display: none; }
h2 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: 15px; color: var(--yellow); margin: 38px 0 12px; display: flex; align-items: center; gap: 12px; }
h2::before { content: ""; width: 22px; height: 2px; background: var(--green); }
h2:first-child { margin-top: 0; }
.take { font-size: 19px; font-weight: 300; line-height: 1.4; max-width: 70ch; margin: 0 0 22px; }
.take b { font-weight: 600; color: var(--yellow); }
.note { color: var(--muted); font-size: 13px; max-width: 90ch; margin: -4px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 12px; min-width: 0; }
.tile .l { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.01em; line-height: 1.05; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile.hero .v { color: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--gap); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card h3 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: 20px; margin: 0 0 2px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.chart { position: relative; min-height: 240px; }
.chart svg { width: 100%; height: auto; display: block; }
.tip { position: absolute; pointer-events: none; background: #0a2252; border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 8px 10px; font-size: 12px; white-space: nowrap; display: none; z-index: 5; }
.tip .d { color: var(--muted); margin-bottom: 3px; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tbox { overflow: auto; max-height: 560px; max-width: 100%; border-radius: var(--r-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; background: #0c2558; text-align: right; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; user-select: none; }
th:first-child, td:first-child { text-align: left; }
th[aria-sort="descending"]::after { content: " ▾"; color: var(--yellow); } th[aria-sort="ascending"]::after { content: " ▴"; color: var(--yellow); }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
td.nm { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; }
tr.tot td { font-weight: 600; border-top: 2px solid var(--line-2); }
td.bar { position: relative; } td.bar i { position: absolute; left: 0; top: 7px; bottom: 7px; background: var(--yellow); opacity: .14; border-radius: 3px; } td.bar span { position: relative; }
.pill { display: inline-block; font-size: 11px; letter-spacing: .06em; border-radius: 999px; padding: 1px 9px; border: 1px solid var(--line-2); color: var(--muted); }
.pill.y { color: var(--yellow); border-color: rgba(242,194,27,.5); } .pill.g { color: var(--green); border-color: rgba(125,201,94,.5); } .pill.c { color: var(--cyan); border-color: rgba(79,195,247,.5); } .pill.r { color: var(--bad); border-color: rgba(255,122,122,.5); }
.up { color: var(--ok); } .dn { color: var(--bad); }
/* criativos */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: var(--gap); }
.cr { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, transform .15s; }
.cr:hover { border-color: var(--line-2); } .cr.sel { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow) inset; }
.cr .top { display: flex; gap: 12px; align-items: flex-start; }
.cr img { width: 92px; height: 115px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); flex: none; }
.cr .ttl { font-family: var(--display); font-size: 21px; line-height: 1.05; font-weight: 500; }
.cr .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cr .big { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.cr .big small { font-family: var(--body); font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 8px; }
.cr .m { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; font-size: 12px; }


.cr .m b { display: block; font-size: 16px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.cr .m span { color: var(--muted); }
.cr .eng { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 10px; }
.cr .ret { border-top: 1px solid var(--line); padding-top: 10px; }
.cr .bk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; font-size: 12px; margin-bottom: 6px; }
.cr .bk b { display: block; font-size: 16px; font-weight: 600; } .cr .bk span { color: var(--muted); } .cr .bk .d { font-size: 11px; margin-left: 5px; }
.cr .fl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 2px; }
.cr .ret svg { width: 100%; height: auto; display: block; }
.cr .lg { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.cr .lg i { display: inline-block; width: 14px; border-top: 2px solid; margin-right: 5px; vertical-align: middle; }
.cr a { font-size: 12px; color: var(--cyan); }
.evo-unused { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.evo .mbar button { font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.evo .mbar button.on { color: #061636; background: var(--yellow); border-color: var(--yellow); font-weight: 600; }
.evo .who { font-family: var(--display); font-size: 19px; margin-bottom: 2px; }
/* fadiga */
.fat-hd { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.fat-flag { font-size: 13px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); max-width: 34ch; }
.fat-flag b { display: block; font-family: var(--display); font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.fat-flag.bad { border-color: rgba(255,122,122,.6); } .fat-flag.bad b { color: var(--bad); } .fat-flag.ok b { color: var(--ok); } .fat-flag.warn b { color: var(--yellow); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.chip { flex: none; display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; max-width: 20rem; }
.chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel-2); flex: none; }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip i { font-style: normal; font-size: 11px; color: var(--dim); }
.chip:hover { color: var(--fg); } .chip.on { color: #061636; background: var(--yellow); border-color: var(--yellow); font-weight: 600; } .chip.on i { color: #061636; }
.sm4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .sm4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sm4 { grid-template-columns: 1fr; } }
.sm { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px 6px; min-width: 0; }
.sm .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sm .t .n { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sm .t .v { font-family: var(--display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm .t .v small { font-family: var(--body); font-size: 11px; font-weight: 500; margin-left: 6px; }
.sm .chart { min-height: 120px; }
/* leituras */
.txt { font-size: 15px; line-height: 1.5; } .txt p { margin: 0 0 9px; } .txt b { font-weight: 600; color: var(--yellow); }
.hb { display: grid; grid-template-columns: minmax(6rem, 12rem) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; margin: 5px 0; }
.hb .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb .tr { height: 9px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; } .hb .fi { height: 100%; border-radius: 3px; background: var(--green); } .hb .vl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb.y .fi { background: var(--yellow); } .hb.c .fi { background: var(--cyan); }
.hbt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.ex { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ex img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); flex: none; background: var(--panel-2); }
.ex .exl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } .ex .exn { font-family: var(--display); font-size: 18px; line-height: 1.1; margin-top: 2px; }
.ex a { font-size: 12px; color: var(--cyan); }
ol.testes { margin: 0; padding-left: 1.3em; line-height: 1.5; } ol.testes li { margin-bottom: 10px; } ol.testes li::marker { color: var(--yellow); font-family: var(--display); font-size: 18px; } ol.testes b { font-weight: 600; color: var(--yellow); }
/* plano */
.pv { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .pv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pv .tile .s { margin-top: 6px; } .pv .tile .d { font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
/* organico */
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: var(--gap); }
.op { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.op img { width: 100%; aspect-ratio: 4 / 5; max-width: 100%; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); }
.op .cap { font-size: 12.5px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.op .mm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.op .mm b { display: block; font-size: 14px; font-weight: 600; } .op .mm span { color: var(--muted); }
.op a { font-size: 12px; color: var(--cyan); }
.foot { color: var(--dim); font-size: 12px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* utilitários (antes inline) */
.mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .chart.short { min-height: 170px; }
[hidden] { display: none !important; }
/* abas de mês */
.months { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
.months button { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: inherit; color: var(--muted); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 14px 7px; cursor: pointer; text-align: left; }
.months button b { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); line-height: 1.1; }
.months button span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.months button span.p { color: var(--cyan); } .months button span.f { color: var(--green); }
.months button:hover { border-color: var(--muted); }
.months button[aria-selected="true"] { background: var(--yellow); border-color: var(--yellow); }
.months button[aria-selected="true"] b, .months button[aria-selected="true"] span { color: #061636; }
.months button:focus-visible, .sair:focus-visible, .login button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fresh { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.fresh b { color: var(--cyan); font-weight: 500; } .fresh.old b { color: var(--orange); }
.sair { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.sair:hover { color: var(--fg); }
.empty { color: var(--muted); padding: 30px 0; }
/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(130% 70% at 50% -10%, #1a4aa6 0%, var(--bg-2) 38%, var(--bg) 100%); }
.login form { width: min(100%, 24rem); display: flex; flex-direction: column; gap: 10px; padding: 26px 24px; }
.login h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 30px; margin: 0 0 8px; }
.login label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.login input { font: inherit; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; }
.login button { font: inherit; font-weight: 600; color: #061636; background: var(--yellow); border: 0; border-radius: var(--r-sm); padding: 10px 14px; cursor: pointer; margin-top: 6px; }
.login .err { color: var(--bad); font-size: 13px; min-height: 1.2em; margin: 0; }
