/* Interactive Plataforma 3S demo (/plataforma/ hero), styled after the real app screens. Everything is scoped under .pd. */
.pd {
  --side: #30343F; --side-2: #2A2E38; --org: #F94317; --green: #2EAD4B; --line: #E4E5E8; --gray: #F3F3F4; --text: #2B2F36; --mut: #6B7080;
  position: relative; display: flex; height: 600px; overflow: hidden;
  background: #fff; color: var(--text); text-align: left;
  font: 14px/1.35 'Source Sans 3', Inter, system-ui, sans-serif; letter-spacing: 0;
}
.pd *, .pd *::before, .pd *::after { box-sizing: border-box; }
.pd button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
.pd input, .pd select { font: inherit; color: inherit; }
.pd b { font-weight: 600; }
.pd-i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pd-sm { width: 14px; height: 14px; }
.pd-xs-i { width: 13px; height: 13px; }
.pd-org { color: var(--org); }
.pd-mut { color: var(--mut); }
.pd-xs { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.pd-ml { margin-left: auto; }
.pd-rel { position: relative; }
.pd-trunc { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.pd-h { font-size: 20px; font-weight: 300; color: #3a3e46; }
.pd-pad { padding: 16px; }
.pd-gray { background: var(--gray); }
.pd-white { background: #fff; }

/* ---- sidebar ---- */
.pd-side { width: 196px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; background: var(--side); color: rgba(255,255,255,.85); padding: 14px 0 12px; transition: width .25s ease; }
.pd-nav { display: flex; flex-direction: column; gap: 2px; }
.pd-nav button { display: flex; align-items: center; gap: 12px; width: calc(100% - 8px); height: 40px; padding: 0 16px; border-radius: 0 6px 6px 0; font-size: 15px; font-weight: 300; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; transition: background .2s; }
.pd-nav button:hover { background: rgba(255,255,255,.06); }
.pd-nav button.is-on { background: linear-gradient(90deg, #6E7382, #4C5160); color: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.pd-nav .pd-i { width: 18px; height: 18px; opacity: .85; }
.pd-beta { margin-left: 2px; padding: 1px 6px; border-radius: 3px; background: #5B606D; font-size: 12px; font-weight: 400; }
.pd-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.pd-logo { display: flex; align-items: center; justify-content: center; width: 84px; height: 76px; border-radius: 3px; background: var(--side-2); flex-shrink: 0; }
.pd-logo img { width: 62px; height: auto; }
.pd-collapse { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: auto; border: 1px solid rgba(255,255,255,.22) !important; border-radius: 4px; color: rgba(255,255,255,.85) !important; }
.pd.is-collapsed .pd-side { width: 56px; }
.pd.is-collapsed .pd-lbl { display: none; }
.pd.is-collapsed .pd-nav button { padding: 0 19px; }
.pd.is-collapsed .pd-brand { flex-direction: column; gap: 8px; padding: 0 6px; }
.pd.is-collapsed .pd-logo { width: 44px; height: 42px; }
.pd.is-collapsed .pd-logo img { width: 34px; }
.pd.is-collapsed .pd-collapse { margin: 0; }

/* ---- main + top bar ---- */
.pd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-top { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pd-sq { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line) !important; border-radius: 4px; background: #fff !important; flex-shrink: 0; }
.pd-search { display: flex; align-items: center; gap: 8px; height: 34px; width: 300px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--mut); }
.pd-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.pd-search input::placeholder, .pd input::placeholder { color: #8A8E98; }
.pd-search-g { width: 210px; background: var(--gray); border-color: transparent; }
.pd-top-r { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pd-sign { height: 34px; padding: 0 12px !important; border-radius: 4px; background: #555A66 !important; color: #fff !important; font-size: 14px; }
.pd-ib { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; color: #4A4E57 !important; }
.pd-ib:hover { background: var(--gray) !important; }
.pd-badge { position: absolute; top: -2px; right: -1px; min-width: 18px; padding: 1px 3px; border-radius: 3px; background: #F5C400; color: #1d1d1f; font-size: 10px; font-weight: 700; line-height: 1.2; text-align: center; }
.pd-user { display: flex; align-items: center; gap: 6px; margin-left: 6px; color: var(--text); }
.pd-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #D9DBE0; color: #555A66; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.pd-avatar-g { width: 30px; height: 30px; }
.pd-avatar-s { width: 22px; height: 22px; font-size: 10px; }
.pd-avatar-l { width: 40px; height: 40px; font-size: 15px; background: #EEF0F3; color: var(--side); }
.pd-view { position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }

/* ---- menus + toast ---- */
.pd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.pd-menu-r { left: auto; right: 0; }
.pd-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.pd-menu button:hover { background: var(--gray); }
.pd-sp { width: 14px; }
.pd-toast { position: absolute; left: 50%; bottom: 16px; z-index: 30; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 6px; background: #1F2229; color: #fff; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.pd-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- sub bars, tabs, buttons ---- */
.pd-sub { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; flex-wrap: wrap; }
.pd-sub-r { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.pd-sub-tabs { padding-top: 0; padding-bottom: 0; align-items: stretch; }
.pd-sub-tabs .pd-sub-r { padding: 8px 0; }
.pd-dd { display: flex; align-items: center; gap: 6px; padding: 6px 4px !important; }
.pd-lnk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px !important; color: #3a3e46; white-space: nowrap; }
.pd-lnk:hover { color: var(--org) !important; }
.pd-btn-org { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px !important; border-radius: 4px; background: var(--org) !important; color: #fff !important; white-space: nowrap; text-decoration: none; }
.pd-btn-org:hover { background: #EA280C !important; }
.pd-btn-o { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px !important; border: 1px solid var(--line) !important; border-radius: 4px; background: #fff !important; white-space: nowrap; }
.pd-full { width: 100%; justify-content: center; margin-top: 14px; }
.pd-tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pd-tabs-in { padding: 0; border: 0; }
.pd-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px !important; border-bottom: 3px solid transparent !important; color: #3a3e46; }
.pd-tabs button.is-on { border-bottom-color: #8A8E98 !important; color: #55595F; }
.pd-tabs .pd-i { width: 22px; height: 22px; }
.pd-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--mut); }

/* ---- Operação ---- */
.pd-op { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; padding: 14px; background: var(--gray); flex: 1; min-height: 0; }
.pd-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.pd-op > .pd-card { display: flex; flex-direction: column; overflow: auto; }
.pd-card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.pd-grp { border-bottom: 1px solid var(--line); }
.pd-grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px !important; }
.pd-late { margin-top: auto; background: #FDEEEE; border-bottom: 0; }
.pd-late .pd-grp-h { color: #E0352B; }
.pd-late .pd-count { border-color: #F6C5C2; color: #E0352B; }
.pd-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 18px; color: #8A8E98; font-size: 13px; }
.pd-empty-i { width: 30px; height: 30px; color: #9A9EA6; }
.pd-tasks { list-style: none; margin: 0; padding: 0 14px 10px; }
.pd-tasks li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.pd-tasks li:first-child { border-top: 0; }
.pd-tasks p { margin: 0; }
.pd-tick { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #B7BAC2 !important; border-radius: 50%; color: transparent !important; flex-shrink: 0; transition: all .15s; }
.pd-tick .pd-i { width: 12px; height: 12px; stroke-width: 3; }
.pd-tick:hover { border-color: var(--green) !important; color: var(--green) !important; }
.pd-tick.is-done { background: var(--green) !important; border-color: var(--green) !important; color: #fff !important; }
.pd-strike { text-decoration: line-through; color: var(--mut); }
.pd-timeline { list-style: none; margin: 0; padding: 14px; position: relative; }
.pd-timeline::before { content: ''; position: absolute; left: 30px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.pd-timeline > li { position: relative; display: flex; gap: 12px; margin-bottom: 14px; }
.pd-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.pd-dot .pd-i { width: 16px; height: 16px; }
.pd-act { flex: 1; min-width: 0; padding: 12px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.09); }
.pd-act p { margin: 6px 0 0; }
.pd-act-h { display: flex; align-items: center; gap: 10px; }
.pd-act-h p { margin: 0; }
.pd-act-l { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.pd-act-l span { display: inline-flex; align-items: center; gap: 4px; }
.pd-act-l button:hover { color: var(--org); }
.pd-pub { display: flex; align-items: center; gap: 8px; margin: 14px; padding: 0 10px; height: 38px; border: 1px solid var(--line); border-radius: 4px; }
.pd-pub input { flex: 1; min-width: 0; border: 0; outline: 0; }
.pd-posts { list-style: none; margin: 0; padding: 0 14px 14px; }
.pd-posts li { padding: 12px; margin-bottom: 10px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.09); }
.pd-posts li p { margin: 8px 0 0; word-wrap: break-word; }
.pd-posts li.pd-hint { box-shadow: none; padding: 4px 0; font-size: 13px; }

/* ---- Resumo / Metas ---- */
.pd-res { display: flex; flex: 1; min-height: 0; }
.pd-res-main { flex: 1; min-width: 0; overflow: auto; }
.pd-res-h { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.pd-metas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 20px; padding: 18px 14px; }
.pd-meta-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pd-period { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.pd-period select { border: 0; background: transparent; padding: 2px 0; cursor: pointer; outline: 0; }
.pd-meta-b { padding: 14px; }
.pd-meta-b p { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 13px; white-space: nowrap; }
.pd-bar { height: 30px; background: var(--gray); overflow: hidden; }
.pd-bar span { display: block; height: 100%; background: var(--green); transition: width .5s ease; }
.pd-panels { width: 240px; flex-shrink: 0; border-left: 1px solid var(--line); background: #FAFAFA; }
.pd-panel-i { display: block; width: 100%; padding: 12px 14px !important; margin-bottom: 8px; border: 1px solid var(--line) !important; border-radius: 4px; background: #fff !important; }
.pd-panel-i.is-on { background: #F0F0F1 !important; }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.pd-kpi { padding: 14px; }
.pd-kpi p { margin: 0; }
.pd-kpi-v { font-size: 24px; font-weight: 600; margin: 4px 0 !important; }
.pd-chart { margin-top: 14px; padding: 14px; }
.pd-chart p { margin: 0; }
.pd-cols { display: flex; align-items: flex-end; gap: 16px; height: 150px; margin-top: 12px; }
.pd-cols > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.pd-col { position: relative; display: block; width: 100%; max-width: 46px; background: var(--side); border-radius: 4px 4px 0 0; }
.pd-col em { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-style: normal; color: var(--mut); }
.pd-cols small { color: var(--mut); }

/* ---- Clientes ---- */
.pd-cli-search { display: flex; align-items: stretch; height: 36px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.pd-cli-search input { width: 170px; min-width: 0; padding: 0 12px; border: 0; outline: 0; background: var(--gray); }
.pd-field { position: relative; display: flex; align-items: center; gap: 4px; padding: 0 10px; border-left: 1px solid var(--line); }
.pd-field select { appearance: none; border: 0; background: transparent; padding-right: 4px; outline: 0; cursor: pointer; }
.pd-cli { position: relative; display: flex; flex: 1; min-height: 0; }
.pd-abas { width: 220px; flex-shrink: 0; padding: 0 14px; border-right: 1px solid var(--line); overflow: auto; }
.pd-abas-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.pd-aba { display: block; width: 100%; padding: 12px 16px !important; margin-bottom: 4px; border-radius: 4px; }
.pd-aba:hover { background: var(--gray) !important; }
.pd-aba.is-on { background: #EDEDEE !important; border: 1px solid var(--line) !important; }
.pd-cli-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pd-chips { display: none; gap: 6px; padding: 10px 12px 0; overflow-x: auto; flex-shrink: 0; }
.pd-chips button { padding: 5px 10px !important; border: 1px solid var(--line) !important; border-radius: 999px; white-space: nowrap; font-size: 13px; }
.pd-chips button.is-on { background: var(--side) !important; border-color: var(--side) !important; color: #fff !important; }
.pd-table-w { flex: 1; overflow: auto; padding: 0 12px; }
.pd-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.pd-table th { position: sticky; top: 0; background: #fff; padding: 14px 16px; text-align: left; font-weight: 400; color: var(--mut); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.pd-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
.pd-table th:last-child, .pd-table td:last-child { border-right: 0; }
.pd-table tbody tr { cursor: pointer; }
.pd-table tbody tr:hover td { background: #FAFAFA; }
.pd-table tbody tr.is-on td { background: #FFF3ED; }
.pd-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 10; width: 300px; max-width: 100%; padding: 16px; background: #fff; border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0,0,0,.08); overflow: auto; }
.pd-drawer-h { display: flex; align-items: center; gap: 10px; }
.pd-drawer-h p { margin: 0; }
.pd-drawer dl { margin: 16px 0 0; }
.pd-drawer dt { font-size: 12px; color: var(--mut); margin-top: 10px; }
.pd-drawer dd { margin: 2px 0 0; word-break: break-all; }

/* ---- Pipes ---- */
.pd-pipes { background: #fff; flex: 1; }
.pd-box { margin: 0 auto 16px; max-width: 1000px; border: 1px solid var(--line); border-radius: 4px; }
.pd-box-gray > .pd-box-h { background: #F7F7F8; }
.pd-box-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px !important; }
.pd-box-b { padding: 16px; border-top: 1px solid var(--line); }
.pd-box-b p { margin: 0; }
.pd-funnels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pd-funnel { position: relative; }
.pd-funnel-b { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 16px 10px 18px !important; border: 1px solid var(--line) !important; border-radius: 8px; background: #fff !important; text-align: center !important; transition: box-shadow .2s, transform .2s; }
.pd-funnel-b:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.pd-funnel.is-stack .pd-funnel-b { box-shadow: 5px 5px 0 -1px #fff, 5px 5px 0 0 var(--line), 10px 10px 0 -1px #fff, 10px 10px 0 0 var(--line); }
.pd-tile { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 4px; }
.pd-funnel.is-stack .pd-tile { border-color: transparent; }
.pd-tile-i { width: 34px; height: 34px; }
.pd-fav { position: absolute; top: 8px; right: 8px; display: inline-flex; padding: 4px !important; border-radius: 4px; color: #9A9EA6 !important; opacity: 0; transition: opacity .15s; }
.pd-funnel:hover .pd-fav, .pd-fav:focus-visible, .pd-fav:has(path[fill]) { opacity: 1; }
.pd-rows { display: flex; flex-direction: column; }
.pd-funnel-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px !important; border-bottom: 1px solid var(--line) !important; }
.pd-funnel-row:hover { background: var(--gray) !important; }
.pd-row-i { width: 24px; height: 24px; }
.pd-board-t { font-size: 16px; }
.pd-board { display: flex; gap: 12px; padding: 14px; overflow-x: auto; flex: 1; background: var(--gray); align-items: flex-start; }
.pd-col-k { width: 220px; flex-shrink: 0; padding: 10px; border-radius: 8px; background: #E9EAEC; }
.pd-col-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pd-col-h .pd-count { background: #fff; }
.pd-deal { padding: 10px; margin-bottom: 8px; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-size: 13px; }
.pd-deal p { margin: 0 0 4px; display: flex; align-items: center; gap: 4px; }
.pd-deal-f { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.pd-deal-f > span:first-child { font-weight: 600; margin-right: auto; }
.pd-move { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; background: #FFF3ED !important; color: var(--org) !important; }
.pd-move:hover { background: var(--org) !important; color: #fff !important; }
.pd-move .pd-i { width: 14px; height: 14px; }
.pd-more { margin: 4px 0 0; font-size: 12px; color: var(--mut); text-align: center; }

/* ---- areas outside the demo ---- */
.pd-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; flex: 1; padding: 24px; text-align: center; background: var(--gray); }
.pd-soon p { max-width: 380px; margin: 0 0 8px; }
.pd-soon-i { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--side); }
.pd-soon-i .pd-i { width: 26px; height: 26px; }

/* the frame around the demo is the size container, so the demo adapts to its own width */
.pd-frame { container-type: inline-size; }

/* ---- smaller frames (the demo sits inside the hero, so it adapts to its own width) ---- */
@container (max-width: 900px) {
  .pd-op { grid-template-columns: 1fr; overflow: auto; }
  .pd-op > .pd-card { overflow: visible; }
  .pd-late { margin-top: 0; }
  .pd-panels { display: none; }
  .pd-abas { display: none; }
  .pd-chips { display: flex; }
}
@container (max-width: 640px) {
  .pd { height: 540px; font-size: 13px; }
  .pd-hide-s { display: none !important; }
  .pd-search { width: auto; flex: 1; }
  .pd-sign { display: none; }
  .pd-sub { padding: 8px 10px; gap: 8px; }
  .pd-cli-search input { width: 110px; }
  .pd-metas { grid-template-columns: 1fr; }
  .pd-drawer { width: 100%; }
  .pd-tabs button { padding: 0 10px !important; }
}
