/* Oestefer Comercial by WSete — tokens do design system Oestefer (tema dark), amarelo da marca #F5BA47 */
:root {
  --bg: #060708;
  --surface: #1a1d21;
  --raised: #2e343b;
  --line: #2e343b;
  --line-strong: #728394;
  --ink: #f2f3f4;
  --muted: #a7a8a8;
  --accent: #f5ba47;
  --accent-hover: #f8cd7a;
  --accent-soft: rgba(245, 186, 71, 0.12);
  --on-accent: #1a1d21;
  --data-2: #99b0c7;
  --data-3: #728394;
  --data-muted: #424a54;
  --positive: #8fd6a8;
  --negative: #ff8a73;
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --r-xl: 20px; --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--positive); }
.neg { color: var(--negative); }
.acc { color: var(--accent); }
.overline { font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hidden { display: none !important; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  repeating-linear-gradient(-60deg, transparent 0 22px, rgba(66,74,84,.18) 22px 26px) , var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 28px; padding: 36px 32px; display: flex; flex-direction: column; gap: 20px; }
.login-card img { height: 40px; width: auto; align-self: flex-start; }
.login-card h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select { height: 44px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); padding: 0 14px; font: inherit; font-size: 15px; }
.btn { height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--raised); background: var(--raised); color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-lg { height: 48px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.form-msg { font-size: 13px; color: var(--negative); min-height: 18px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; padding: 28px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 24px; }
.brand img { height: 30px; width: auto; align-self: flex-start; }
.nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r-md); color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.active { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 500; }
.nav a.active svg { color: var(--accent); }
.nav .sep { padding: 20px 12px 8px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--raised); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }
.me .who { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.me .who span:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span:last-child { font-size: 12px; color: var(--muted); }
.iconbtn { width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.iconbtn:hover { color: var(--ink); background: var(--raised); }
main.content { flex: 1 1 auto; min-width: 0; padding: 36px 48px 64px; display: flex; flex-direction: column; gap: 28px; max-width: 1520px; }
.tabbar { display: none; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.page-head h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; }
.page-head .sub { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.chip-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }

.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.row > .wide { flex: 1.35 1 480px; min-width: 0; }
.row > .narrow { flex: 1 1 340px; min-width: 0; }
.row > .third { flex: 1 1 300px; min-width: 0; }
.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 400; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.kpi { gap: 10px; }
.kpi.focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi .lab { font-size: 12px; color: var(--muted); }
.kpi .val { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 36px; letter-spacing: -.01em; }
.kpi .note { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .val { white-space: nowrap; }
.kpi .spark { margin-top: auto; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-line { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.sw-dash { width: 16px; height: 0; border-top: 2px dashed var(--data-2); display: inline-block; }
.inner { background: var(--raised); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inner.focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.inner .lab { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inner .v { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 26px; white-space: nowrap; }
.inner .v.mono-v, .mono-v { font-family: var(--font-mono); font-weight: 500; font-size: 16px; }
.inner .v small { font-size: .7em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }

.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-row { gap: 8px; }
.bar-row .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; white-space: nowrap; }
.bar-row .top > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.note1 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { position: relative; height: 10px; border-radius: 4px; background: var(--raised); }
.track .fill { height: 100%; border-radius: 4px; }
.track .mark { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); }
.comb { display: flex; gap: 3px; height: 10px; }
.comb span { flex: 1 1 0; border-radius: 2px; background: var(--data-muted); }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; min-width: 640px; border-collapse: collapse; }
.tbl th { font-size: 12px; font-weight: 400; color: var(--muted); text-align: right; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 8px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 0; font-family: var(--font-sans); font-size: 14px; }
.tbl td:first-child { font-weight: 500; }
.tbl tr.total td { border-bottom: 0; font-weight: 500; }
.insight { gap: 8px; }
.insight .overline { color: var(--accent); }
.insight p { margin: 0; font-size: 14px; line-height: 21px; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 20px; color: var(--muted); text-align: center; background:
  repeating-linear-gradient(-60deg, transparent 0 14px, rgba(66,74,84,.15) 14px 17px); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--raised); }
.user-row .name { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.user-row .name span:last-child { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tag { height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; font-size: 12px; }
.seller-card .big { font-family: var(--font-display); font-weight: 600; font-size: 28px; }
.status-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }
.dot.warn { background: var(--accent); }
.dot.err { background: var(--negative); }
svg text { font-family: var(--font-sans); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .sidebar { display: none; }
  main.content { padding: 20px 16px 96px; gap: 16px; }
  .grid-kpi { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .kpi { padding: 16px; }
  .kpi .val { font-size: 22px; line-height: 28px; }
  .card { padding: 18px; }
  .row { gap: 16px; }
  .row > .wide, .row > .narrow, .row > .third { flex-basis: 100%; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); position: fixed; left: 0; right: 0; bottom: 0; height: 68px; background: var(--surface); border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 11px; }
  .tabbar a.active { color: var(--accent); font-weight: 500; }
  .mobile-head { display: flex !important; }
  .hide-mobile { display: none !important; }
}
.mobile-head { display: none; justify-content: space-between; align-items: center; }
.mobile-head img { height: 22px; }

/* ---------- componentes ---------- */
.proj-val { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 38px; letter-spacing: -.01em; white-space: nowrap; }
.scen { display: flex; flex-direction: column; gap: 16px; }
.scen.big { gap: 26px; }
.scen.big .bar-row .top { font-size: 15px; }
.scen.big .track { height: 14px; border-radius: 6px; }
.scen.big .track .fill { border-radius: 6px; }
.seller-row { gap: 12px; }
.seller-top { display: flex; align-items: center; gap: 14px; }
.seller-row .avatar { background: var(--surface); }
.seller-id { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.seller-id .nm { font-weight: 500; }
.seller-id .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-pct { font-family: var(--font-display); font-weight: 600; font-size: 24px; display: inline-block; }
.seller-pct.hit, .big.pos, .big-pct.hit { color: var(--positive); }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.mini-weeks { display: flex; align-items: flex-end; gap: 10px; height: 104px; }
.mini-weeks > div { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.mini-weeks i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--data-muted); }
.mini-weeks span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mini-weeks span.mono { font-size: 10px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.stats3 > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stats3 span { font-size: 12px; color: var(--muted); }
.stats3 b { font-weight: 500; white-space: nowrap; }
.comb.big { height: 18px; gap: 5px; }
.comb.big span { border-radius: 3px; }

/* ---------- TV ---------- */
.tv-viewport { position: fixed; inset: 0; background: var(--bg); overflow: hidden; cursor: none; }
.tv-viewport.show-cursor { cursor: default; }
.tv { width: 1920px; height: 1080px; transform-origin: 0 0; position: absolute; left: 0; top: 0; padding: 40px 52px; display: flex; flex-direction: column; gap: 28px; }
.tv .card { padding: 32px 36px; gap: 20px; overflow: hidden; }
.tv .card h2 { font-size: 28px; line-height: 34px; }
.tv .legend { font-size: 18px; gap: 24px; }
.tv .legend .sw { width: 16px; height: 16px; }
.tv .legend .sw-line { width: 20px; }
.tv .overline { font-size: 15px; }
.tv-head { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-shrink: 0; }
.tv-head .l { display: flex; align-items: center; gap: 24px; min-width: 0; }
.tv-head img { height: 54px; }
.tv-head .vsep { width: 1px; height: 60px; background: var(--line); }
.tv-head h1 { margin: 0; font-size: 38px; line-height: 44px; font-weight: 500; white-space: nowrap; }
.tv-head .sub { font-size: 19px; color: var(--muted); white-space: nowrap; }
.tv-head .r { display: flex; align-items: center; gap: 28px; }
.tv-steps { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tv-step-name { font-size: 20px; color: var(--accent); font-weight: 500; }
.tv-step-n { font-size: 15px; color: var(--muted); margin-left: 10px; }
.tv-steps > span { display: inline; }
.tv-steps { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-items: end; }
.tv-seg { grid-column: 1 / -1; display: flex; gap: 6px; }
.tv-seg span { width: 44px; height: 6px; border-radius: 3px; background: var(--data-muted); position: relative; overflow: hidden; }
.tv-seg span.done { background: rgba(245,186,71,.45); }
.tv-seg span i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 3px; }
.tv-clock { font-family: var(--font-mono); font-size: 26px; }
.tv-by { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.tv-scene { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tv-grid { display: grid; gap: 28px; flex: 1 1 auto; min-height: 0; }
.tv-foot { height: 60px; flex-shrink: 0; display: flex; align-items: center; gap: 20px; padding: 0 28px; border-radius: 999px; background: var(--surface); }
.tv-foot .overline { color: var(--accent); }
.tv-foot .msg { flex-grow: 1; font-size: 21px; transition: opacity .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-foot .dots { display: flex; gap: 8px; align-items: center; }
.tv-foot .dots span { height: 8px; width: 8px; border-radius: 999px; background: var(--data-muted); transition: width .3s; }
.tv-foot .dots span.on { width: 28px; background: var(--accent); }
.tv-exit { position: fixed; right: 16px; bottom: 16px; z-index: 5; opacity: 0; transition: opacity .2s; }
.tv-viewport.show-cursor .tv-exit { opacity: 1; }
.tv .kpi { justify-content: flex-start; }
.tv .kpi .lab { font-size: 21px; line-height: 26px; }
.tv .kpi .val { font-size: 48px; line-height: 54px; }
.tv .kpi .note { font-size: 18px; line-height: 24px; }
.tv-ring { align-items: center; justify-content: center; gap: 32px; }
.ring-wrap { position: relative; flex-shrink: 0; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ring-pct { font-family: var(--font-display); font-weight: 600; font-size: 76px; line-height: 80px; letter-spacing: -.02em; }
.chip-pos, .chip-neutral { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px; font-size: 22px; font-weight: 500; }
.chip-pos { background: rgba(143,214,168,.12); color: var(--positive); }
.chip-neutral { background: var(--raised); color: var(--ink); }
.tv-hero, .tv-callout, .tv-proj { gap: 12px; }
.hero-val { font-family: var(--font-display); font-weight: 600; font-size: 104px; line-height: 108px; letter-spacing: -.025em; white-space: nowrap; }
.hero-val.acc { color: var(--accent); }
.hero-sub { font-size: 24px; color: var(--muted); white-space: nowrap; }
.tv-seller { gap: 18px; }
.tv-seller .seller-top .avatar { width: 52px; height: 52px; font-size: 22px; }
.tv-seller .nm { font-size: 30px; font-weight: 500; }
.big-pct { font-family: var(--font-display); font-weight: 600; font-size: 112px; line-height: 112px; letter-spacing: -.03em; display: inline-block; }
.tv-seller .sub { font-size: 22px; color: var(--muted); }
.tv-seller .mini-weeks { height: 170px; margin-top: auto; }
.tv-seller .mini-weeks span { font-size: 16px; }
.tv-seller .mini-weeks span.mono { font-size: 15px; }
.tv-seller .stats3 span { font-size: 17px; }
.tv-seller .stats3 b { font-size: 24px; }
.tv-week { gap: 20px; }
.tv .inner { padding: 22px 26px; gap: 8px; }
.tv .inner .lab { font-size: 18px; }
.tv .inner .v { font-size: 44px; line-height: 50px; }
.tv .inner .v.mono-v { font-size: 28px; line-height: 34px; }
.tv .scen.big { gap: 30px; }
.tv .scen.big .bar-row .top { font-size: 21px; }
.tv .scen.big .track { height: 26px; }
.tv .scen .bar-row .top { font-size: 18px; }
.tv .scen .track { height: 18px; border-radius: 6px; }
.tv .scen .legend { font-size: 17px; }
.tv-funnel { gap: 26px; }
.tv-funnel .bar-row .top, .tv-sellproj .bar-row .top { font-size: 19px; }
.fbar { height: 40px; border-radius: 10px; }
.fbar.dashed { border: 2px dashed var(--data-2); box-sizing: border-box; }
.tv-sellproj { gap: 28px; }
.tv-sellproj .nm { font-size: 24px; font-weight: 500; }
.tv-sellproj .pc { font-family: var(--font-display); font-weight: 600; font-size: 32px; }
.tv-sellproj .track { height: 20px; border-radius: 6px; }
.tv-sellproj .note1 { font-size: 17px; }
.tv-alerts .insight { gap: 16px; justify-content: center; padding: 40px 48px; }
.tv-alerts .insight .overline { font-size: 17px; }
.tv-alerts .insight p { font-size: 32px; line-height: 44px; }
.tv .seller-row.is-tv { padding: 16px 20px; gap: 12px; }
.tv .seller-row.is-tv .avatar { width: 40px; height: 40px; font-size: 18px; }
.tv .seller-row.is-tv .nm { font-size: 21px; }
.tv .seller-row.is-tv .sub { font-size: 15px; }
.tv .seller-row.is-tv .seller-pct { font-size: 34px; }

/* ---------- animações (sutis; desligadas para quem prefere menos movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .a-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: oe-grow .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  .a-growh { transform-origin: 50% 100%; animation: oe-grow .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  .a-fade { animation: oe-fade .6s ease both; animation-delay: var(--d, 0ms); }
  .a-fadeup { animation: oe-fadeup .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  .a-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: oe-draw 1.3s cubic-bezier(.45,0,.2,1) forwards; animation-delay: var(--d, 0ms); }
  .a-fill { animation: oe-fill 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  .a-ring { animation: oe-ring 1.5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
  .a-tick { animation: oe-tick .35s ease both; animation-delay: var(--d, 0ms); }
  .a-pop { animation: oe-pop .6s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--d, 0ms); }
  .a-glow { animation: oe-grow .9s cubic-bezier(.2,.8,.2,1) both, oe-glow 2.6s ease-in-out 1.2s 3; animation-delay: var(--d, 0ms), calc(var(--d, 0ms) + 1000ms); }
  .kpi.focus { animation: oe-focus 3s ease-in-out 1s 2; }
  main.content > *, .tv-grid > * { animation: oe-fadeup .55s cubic-bezier(.2,.8,.2,1) both; }
  main.content > *:nth-child(2) { animation-delay: 40ms; } main.content > *:nth-child(3) { animation-delay: 80ms; }
  main.content > *:nth-child(4) { animation-delay: 120ms; } main.content > *:nth-child(5) { animation-delay: 160ms; }
  main.content > *:nth-child(6) { animation-delay: 200ms; } main.content > *:nth-child(n+7) { animation-delay: 240ms; }
  .tv-grid > *:nth-child(2) { animation-delay: 90ms; } .tv-grid > *:nth-child(3) { animation-delay: 180ms; } .tv-grid > *:nth-child(4) { animation-delay: 270ms; }
  .grid-kpi > *, .insights > * { animation: oe-fadeup .55s cubic-bezier(.2,.8,.2,1) both; }
  .grid-kpi > *:nth-child(2), .insights > *:nth-child(2) { animation-delay: 70ms; } .grid-kpi > *:nth-child(3), .insights > *:nth-child(3) { animation-delay: 140ms; } .grid-kpi > *:nth-child(4), .insights > *:nth-child(4) { animation-delay: 210ms; }
  .tv-head h1, .tv-head .sub { animation: oe-fadeup .5s ease both; }
}
.still *, .still *::before { animation: none !important; }
.still .a-draw { stroke-dashoffset: 0; }
@keyframes oe-grow { from { transform: scaleY(0); } }
@keyframes oe-fade { from { opacity: 0; } }
@keyframes oe-fadeup { from { opacity: 0; transform: translateY(10px); } }
@keyframes oe-draw { to { stroke-dashoffset: 0; } }
@keyframes oe-fill { from { width: 0; } }
@keyframes oe-ring { from { stroke-dashoffset: var(--from); } }
@keyframes oe-tick { from { opacity: .15; transform: scaleY(.3); } }
@keyframes oe-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes oe-glow { 50% { filter: drop-shadow(0 0 14px rgba(245,186,71,.55)); } }
@keyframes oe-focus { 50% { box-shadow: inset 0 0 0 1px var(--accent), 0 0 28px rgba(245,186,71,.18); } }
@media (max-width: 860px) {
  .insights { gap: 16px; }
  .proj-val { font-size: 26px; line-height: 32px; }
  .card { gap: 16px; }
  .kpi .val { font-size: 22px; line-height: 28px; }
}

.tv-proj { justify-content: center; gap: 16px; }
.tv-proj .scen { margin-top: 36px; }
.tv-week { justify-content: center; gap: 24px; }
.tv-funnel, .tv-sellproj { justify-content: center; }
.tv-funnel { gap: 36px; }
.tv-sellproj { gap: 40px; }
.tv-funnel, .tv-sellproj, .tv-week { justify-content: flex-start; }
.tv-funnel > h2, .tv-sellproj > h2, .tv-week > .card-head { margin-bottom: auto; }
.tv-funnel > :last-child, .tv-sellproj > :last-child, .tv-week > :last-child { margin-bottom: auto; }
.fbar.sm { height: 10px; border-radius: 4px; border-width: 1.5px; }

/* ---------- fase 2: administração ---------- */
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 28px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.drop input[type=file] { display: none; }
.file-card { gap: 16px; }
.file-card .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.file-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.file-card.err { box-shadow: inset 0 0 0 1px var(--negative); }
.file-card.ok { box-shadow: inset 0 0 0 1px var(--positive); }
.tbl input, .tbl select { height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); padding: 0 10px; font: inherit; font-size: 13px; width: 100%; min-width: 96px; text-align: right; font-family: var(--font-mono); }
.tbl td.l input { text-align: left; font-family: var(--font-sans); }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row .field { flex: 1 1 180px; }
.codigo { font-family: var(--font-mono); font-size: 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--raised); word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--raised); color: var(--ink); padding: 12px 18px; border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(0,0,0,.5); z-index: 50; font-size: 14px; }
.toast.err { color: var(--negative); }
.tag.pos { border-color: var(--positive); color: var(--positive); }
.tag.neg { border-color: var(--negative); color: var(--negative); }
.tag.acc { border-color: var(--accent); color: var(--accent); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); min-width: 0; }
@media (max-width: 860px) { .toast { bottom: 84px; width: calc(100% - 32px); } }

/* ---------- orçamentos ---------- */
.orc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.orc-row:last-child { border-bottom: 0; }
.orc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.orc-main .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orc-main .sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orc-val { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.orc-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.orc-acts:empty { display: none; }
.nav .sep { display: block; }

/* ---------- fase 4: CRM de reativação ---------- */
.tag.info { border-color: var(--data-2); color: var(--data-2); }
.orc-main a.nm { color: var(--ink); text-decoration: none; }
.orc-main a.nm:hover { text-decoration: underline; }
.tbl th.l, .tbl td.l { text-align: left; font-family: var(--font-sans); }
.tbl td a { color: var(--ink); }
.busca { display: flex; gap: 8px; align-items: center; }
.busca input { flex: 1; min-width: 0; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; font-size: 15px; }
.cli-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); transition: opacity .24s ease, transform .24s ease; }
.cli-row:last-of-type { border-bottom: 0; }
.cli-row.sai { opacity: 0; transform: translateX(24px); }
.cli-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.cli-main:hover .nm { text-decoration: underline; }
.cli-main .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-main .sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.motivo { font-size: 13px; color: var(--ink); }
.motivo.acc { color: var(--accent); }
.motivo-lg { font-size: 16px; line-height: 24px; }
.cli-side { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.para-hoje .cli-row { padding: 10px 0; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini-row:last-of-type { border-bottom: 0; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-item:first-child::before { top: 16px; }
.tl-item:last-child::before { bottom: calc(100% - 16px); }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 4px; position: relative; z-index: 1; border: 2px solid var(--surface); }
.tl-dot.ped { background: var(--data-2); }
.tl-dot.acao { background: var(--accent); }
.tl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-body .sub { font-size: 12px; }
.tl-body .obs { font-size: 13px; color: var(--muted); font-style: italic; }
.chip.lg { height: 44px; padding: 0 16px; font-size: 14px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(6, 7, 8, .6); z-index: 40; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); z-index: 41; padding: 24px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; box-shadow: -16px 0 40px rgba(0,0,0,.45); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { margin: 0 0 2px; font-size: 20px; line-height: 28px; font-weight: 500; }
.sheet-sec { display: flex; flex-direction: column; gap: 10px; }
.sheet textarea, .sheet .inp { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); padding: 10px 14px; font: inherit; font-size: 15px; }
.sheet .inp { height: 44px; padding: 0 14px; color-scheme: dark; }
.sheet textarea { resize: vertical; min-height: 76px; }
.sheet .btn-lg:disabled { opacity: .45; cursor: not-allowed; }
body.sheet-open { overflow: hidden; }
.toast.undo { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.iconbtn { min-width: 44px; min-height: 44px; }
.nav a .badge, .tabbar a .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); }
.nav a .badge { margin-left: auto; }
.tabbar a { position: relative; }
.tabbar a .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: sheet-in-r .22s ease-out; }
  .sheet-bg { animation: fade-in .2s ease-out; }
}
@keyframes sheet-in-r { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-in-b { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 860px) {
  .sheet { top: auto; left: 0; width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px rgba(0,0,0,.45); animation-name: sheet-in-b; }
  .cli-row .orc-acts .btn { flex: 1 1 auto; height: 44px; }
  .cli-side .tag { white-space: nowrap; }
}
a.chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.tbl input[type=checkbox] { width: 20px; height: 20px; min-width: 0; padding: 0; accent-color: var(--accent); }
.form-row .field select { max-width: 360px; }
.sheet-foot { position: sticky; bottom: -24px; margin: auto -24px -24px; padding: 16px 24px 24px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .sheet-foot { bottom: calc(-20px - env(safe-area-inset-bottom)); margin: auto -16px calc(-20px - env(safe-area-inset-bottom)); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .sheet { gap: 16px; }
}

/* ---------- alvos de toque de 44 px ----------
   Chips e botões pequenos mantêm a altura visual do design system (32 px) e ganham área de toque
   de 44 px por um pseudo-elemento. Controles de ação do celular e campos de tabela crescem de fato. */
@media (pointer: coarse), (max-width: 860px) {
  .chip, .btn-sm, .tbl td a { position: relative; }
  .chip::after, .btn-sm::after, .tbl td a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .orc-main a.nm { display: block; padding: 12px 0; margin: -12px 0; }
  .btn, .btn.btn-sm { height: 44px; }
  .btn.btn-lg { height: 48px; }
  .tbl input, .tbl select { height: 44px; }
  .cli-main { min-height: 44px; justify-content: center; }
  .chips { row-gap: 12px; }
}

/* ---------- fase 5: filtro de datas e carteira ---------- */
.filtro-datas { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.fdates { display: flex; gap: 8px; flex-wrap: wrap; }
.fdate { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.fdate input { height: 40px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; font-size: 14px; color-scheme: dark; }
.fnote { flex-basis: 100%; margin: 0; font-size: 12px; }
.tbl td.neg, .mono.neg { color: var(--negative); }
.tbl td.pos, .mono.pos { color: var(--positive); }
.tbl td.l a { color: var(--ink); }
.vcols { display: flex; align-items: flex-end; gap: 8px; min-height: 240px; overflow-x: auto; padding-bottom: 4px; }
.vcol { flex: 1 0 40px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vtrack { width: 100%; max-width: 44px; height: 180px; display: flex; align-items: flex-end; border-radius: 6px; background: var(--raised); }
.vfill { width: 100%; border-radius: 6px 6px 4px 4px; background: linear-gradient(180deg, #f8cd7a, var(--accent)); }
.vfill.recente { background: var(--data-3); }
.vval { font-size: 12px; }
.vlab { font-size: 12px; color: var(--muted); }
.vsub { font-size: 11px; color: var(--muted); }
@media (max-width: 860px) { .fdate input { height: 44px; } }
.tbl td.wrap { white-space: normal; min-width: 150px; }
.mini-row a { color: var(--ink); }
.mini-row > span:last-child { white-space: nowrap; }
