:root { --accent: var(--shaa-primary); --bg: var(--shaa-canvas); --panel: var(--shaa-surface); --line: var(--shaa-hairline); --muted: var(--shaa-muted); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--shaa-canvas); color: var(--shaa-ink); font-family: var(--shaa-font-sans); font-size: 15px; line-height: 1.55; }
#app { max-width: 880px; margin: 0 auto; padding: 40px 20px 80px; }
h1 { font-size: 26px; margin: 0 0 4px; color: var(--shaa-ink); }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--shaa-muted); margin: 32px 0 12px; }
h3 { color: var(--shaa-ink); }
.sub { color: var(--shaa-muted); margin: 0 0 8px; }
a { color: var(--shaa-primary); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .meta { color: var(--shaa-muted); font-size: 12px; }

.row { display: flex; gap: 8px; align-items: center; }
.btn { font: inherit; font-size: 13px; cursor: pointer; padding: 9px 14px; border-radius: 9999px; background: var(--shaa-primary); color: #fff; border: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--shaa-primary-hover); }
.btn.ghost { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); color: var(--shaa-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-size: 12px; color: var(--shaa-muted); margin: 12px 0 4px; }
input { width: 100%; background: var(--shaa-surface); color: var(--shaa-ink); border: 1px solid var(--shaa-hairline); border-radius: 9px; padding: 10px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--shaa-primary); box-shadow: var(--shaa-focus); }

.widget { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.widget label { margin-top: 0; }
.tag { font-size: 10px; text-transform: uppercase; color: var(--shaa-muted); background: var(--shaa-surface-soft); border: 1px solid var(--shaa-hairline); border-radius: 999px; padding: 2px 7px; margin-left: 6px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { font-size: 13px; padding: 10px 12px; border-radius: 9px; margin: 10px 0; }
.note.ok { background: #E1F5EE; color: #0F6E56; }
.note.err { background: #FCEBEB; color: #A32D2D; }
.pages { display: flex; flex-direction: column; gap: 8px; }
.page-row { display: flex; justify-content: space-between; align-items: center; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 11px; padding: 10px 14px; }
.muted { color: var(--shaa-muted); font-size: 12px; }

/* Production timeline */
.prod-live { font-size: 11px; color: var(--shaa-success); margin-left: 8px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.phase { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.phase-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.members-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.member-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 10px 14px; }
.member-form { gap: 8px; flex-wrap: wrap; }
.member-form input, .member-form select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; }
.role-cliente    { background: #E1F5EE; color: #0F6E56; }
.role-fornecedor { background: #E6F1FB; color: #005BAB; }
.role-externo    { background: #EFE6FA; color: #5B3A8C; }
.role-equipe_obra{ background: #FBEAD7; color: #8A4B00; }
.role-gp         { background: #DBEAFE; color: #1E40AF; }
.role-equipe     { background: #CCEBE4; color: #0F6E56; }
.role-estagiario { background: #ECE8E2; color: #615D59; }
.role-gestor_custos { background: #D8F5E3; color: #166534; }

/* ---- CDE (documentos & arquivos) ---- */
.cde-block { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.cde-head { margin-bottom: 10px; }
.cde-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.cde-form input, .cde-form select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; }
.cde-form input { flex: 1 1 160px; min-width: 120px; }
.cf-auto { font-size: 12px; color: var(--shaa-muted); display: flex; gap: 5px; align-items: center; }
.btn.xs, .btn.ghost.xs { padding: 3px 8px; font-size: 12px; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.fam-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 8px; text-align: center; }
.fam-thumb { height: 78px; border-radius: 8px; background: var(--shaa-surface-soft) center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size: 30px; margin-bottom: 6px; }
.fam-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cde-zone { margin-bottom: 14px; }
.cde-zone-head { font-weight: 700; margin: 10px 0 6px; display: flex; align-items: center; gap: 8px; }
.zbadge { display:inline-flex; width:22px; height:22px; align-items:center; justify-content:center; border-radius:6px; font-size:12px; font-weight:700; }
.zbadge.z-A { background:#FBEAD7; color:#8A4B00; } .zbadge.z-B { background:#FBE9F4; color:#A3246B; } .zbadge.z-C { background:#E1F5EE; color:#0F6E56; }
.cde-folder { padding: 4px 0; border-bottom: 1px solid var(--shaa-hairline); }
.cde-folder-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.cde-foldername { font-weight: 600; }
.cde-perms { display: inline-flex; gap: 4px; }
.cde-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0 3px 22px; font-size: 13px; color: var(--shaa-ink-secondary); }
.cde-fname { font-weight: 500; }
.cde-fact { display: inline-flex; gap: 4px; margin-left: auto; }
.kbadge { font-size: 10px; padding: 2px 6px; border-radius: 6px; background: var(--shaa-surface-soft); color: var(--shaa-muted); white-space:nowrap; }
.kbadge.k-rvt { background:#E6F1FB; color:#005BAB; } .kbadge.k-rte { background:#E6F1FB; color:#005BAB; }
.kbadge.k-rfa { background:#EFE6FA; color:#5B3A8C; } .kbadge.k-ifc { background:#E1F5EE; color:#0F6E56; }
.kbadge.k-bcf { background:#FCEBEB; color:#A32D2D; }
.pill.auto { background:#E1F5EE; color:#0F6E56; }
.pill.lock-meeting { background:#FBEAD7; color:#8A4B00; }
.pill.name-warn { background:#FBEAD7; color:#8A4B00; }
.pill.main-pill { background:#E6F1FB; color:#005BAB; }
.cde-naming { margin: 4px 0 8px; }
.proj-name { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.proj-name label { display:block; font-size: 12px; color: var(--shaa-muted); margin-bottom: 6px; }
.proj-name input { flex: 1; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; }
.proj-mains { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.changed-banner { background: #FBEAD7; border: 1px solid #8A4B00; color: #8A4B00; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.pill.lock-locked { background:#FCEBEB; color:#A32D2D; }
.cde-zone-desc { font-size: 12px; margin: 0 0 6px 30px; }
.cde-coord { font-size: 12px; margin-bottom: 10px; padding: 6px 10px; background: var(--shaa-surface-soft); border: 1px solid var(--shaa-hairline); border-radius: 8px; }
.modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 18px; width: min(440px, 92vw); max-height: 80vh; overflow: auto; }
.modal h3 { margin: 0 0 6px; }
.modal-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.modal-list .mk-item { width: 100%; text-align: left; }
.cde-tut { margin-top: 8px; font-size: 13px; }
.cde-tut summary { cursor: pointer; color: var(--shaa-primary); }
.cde-tut .tut-body { margin-top: 8px; color: var(--shaa-ink-secondary); }
.cde-tut code { background: var(--shaa-surface-soft); padding:1px 5px; border-radius:5px; }

/* ---- BCF (rastreador de issues) ---- */
.bcf-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.bcf-total { margin-right: 6px; }
.bcf-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bcf-filters select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; }
.bcf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.bcf-form input, .bcf-form select, .bcf-form textarea { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; font: inherit; }
.bcf-form #bi-title, .bcf-form #bi-desc, .bcf-form #bi-snap { grid-column: 1 / -1; }
.bcf-form #bi-add { grid-column: 1 / -1; }
.bcf-form textarea { min-height: 54px; resize: vertical; }
.bcf-list { display: flex; flex-direction: column; gap: 10px; }
.bcf-card { display: flex; gap: 12px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px; }
.bcf-snap { flex: 0 0 120px; height: 90px; border-radius: 8px; background: var(--shaa-surface-soft) center/cover no-repeat; }
.bcf-body { flex: 1; min-width: 0; }
.bcf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bcf-desc { margin: 6px 0; color: var(--shaa-ink-secondary); font-size: 14px; }
.bcf-comments { margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.bcf-cmt { background: var(--shaa-surface-soft); border-radius: 8px; padding: 6px 9px; font-size: 13px; }
.bcf-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.bcf-status-sel { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; font-size: 12px; }

/* ---- Kanban ---- */
.kb-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.kb-col { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 10px; min-height: 200px; }
.kb-col.kb-over { border-color: var(--shaa-primary); background: var(--shaa-surface-soft); }
.kb-col-head { font-weight: 700; font-size: 13px; padding: 4px 6px 10px; display: flex; justify-content: space-between; align-items: center; }
.kb-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kb-card { position: relative; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kb-card b { display: block; font-size: 14px; margin-bottom: 6px; padding-right: 18px; }
.kb-card.kb-drag { opacity: .5; }
.kb-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.kb-fase { background: #EEF3FB; color: #2C5AA0; border-color: #CFE0F5; }
.kb-cap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 12px; }
.kb-cap:empty { display: none; }
.kb-cap-tot { color: var(--shaa-ink); margin-right: 6px; }
.kb-cap-tot b { color: var(--shaa-primary); font-variant-numeric: tabular-nums; }

/* Planner semanal — quadro de UM funcionário (agenda dias × horas) */
.pl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.btn.xs { padding: 5px 11px; font-size: 12px; }
.pl-cap.pl-over, .kb-cap-tot b.pl-over { color: #A32D2D; }
.pl-agenda { display: grid; grid-template-columns: 42px repeat(6, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; align-items: start; }
.pl-ruler { display: flex; flex-direction: column; }
.pl-rh { height: 30px; }
.pl-hr { height: 88px; font-size: 10px; color: var(--shaa-muted); text-align: right; padding-right: 4px; border-top: 1px solid var(--shaa-hairline); }
.pl-day { display: flex; flex-direction: column; }
.pl-dayh { height: 30px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--shaa-muted); }
.pl-dayh span { font-weight: 500; }
.pl-dayh b { margin-left: auto; color: var(--shaa-primary); font-variant-numeric: tabular-nums; }
.pl-dayh.pl-hoje { color: var(--shaa-primary); }
.pl-daycards { background: var(--shaa-canvas); border: 1px dashed var(--shaa-hairline); border-radius: 10px; padding: 6px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.pl-day.pl-over .pl-daycards, .pl-backlog.pl-over .pl-daycards { border-color: var(--shaa-primary); background: #EEF3FB; }
.pl-backlog { margin-top: 14px; }
.pl-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-left: 4px solid var(--shaa-hairline); border-radius: 8px; padding: 6px 8px; cursor: grab; font-size: 12px; }
.pl-card b { display: block; font-size: 12px; line-height: 1.25; margin: 2px 0; white-space: normal; }
.pl-card.pl-drag { opacity: .5; }
.pl-proj { font-size: 10px; color: var(--shaa-muted); text-transform: uppercase; letter-spacing: .02em; }
.pl-h { font-size: 11px; color: var(--shaa-muted); font-variant-numeric: tabular-nums; }
.pl-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.pl-meta .pill { font-size: 10px; padding: 1px 6px; }
.pl-card .kb-prog { margin-top: 6px; }

/* Funcionários — quadro por pessoa (direcionar) + A agendar */
.fn-board { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 6px; }
.fn-col { flex: 0 0 240px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.fn-col.fn-todo { background: var(--shaa-surface-soft); border-style: dashed; }
.fn-col.pl-over { border-color: var(--shaa-primary); background: #EEF3FB; }
.fn-head { font-size: 13px; font-weight: 600; color: var(--shaa-ink); display: flex; align-items: center; gap: 6px; padding: 2px 2px 6px; border-bottom: 1px solid var(--shaa-hairline); }
.fn-head .pill { margin-left: auto; font-weight: 500; }
.fn-cards { display: flex; flex-direction: column; gap: 8px; min-height: 50px; }
/* prioridade + ação do executor */
.pl-card { position: relative; }
.pill.prio-alta { background: #FCEBEB; color: #A32D2D; }
.pill.prio-media { background: #FBF3DF; color: #8A5A00; }
.pill.prio-baixa { background: var(--shaa-surface-soft); color: var(--shaa-muted); }
.pl-play { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: var(--shaa-muted); cursor: pointer; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.pl-play:hover { color: var(--shaa-primary); border-color: var(--shaa-primary); }
.pl-play.on { background: #2E8B57; color: #fff; border-color: #2E8B57; }
.pl-card b { padding-right: 26px; }
.pl-green { border-left-color: #2E8B57; } .pl-green b { color: #1c6b41; }
.pl-yellow { border-left-color: #E0A41E; }
.pl-red { border-left-color: #C0392B; background: #FBEBEA; }
.pl-done { border-left-color: #9aa1ad; opacity: .65; } .pl-done b { text-decoration: line-through; }
.pl-todo { border-left-color: #6B7280; }
.pl-legend { font-size: 11px; color: var(--shaa-muted); display: inline-flex; align-items: center; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin: 0 3px 0 10px; }
.pl-dot.pl-green { background: #2E8B57; } .pl-dot.pl-yellow { background: #E0A41E; } .pl-dot.pl-red { background: #C0392B; }
.pl-checks { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--shaa-hairline); }
.pl-ctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.pl-ctl input, .pl-ctl select { padding: 4px 6px; font-size: 11px; border: 1px solid var(--shaa-hairline); border-radius: 7px; background: var(--shaa-surface); }
.pl-ctl label { margin: 0; font-size: 11px; color: var(--shaa-muted); display: inline-flex; gap: 4px; align-items: center; }

/* Modal da tarefa (checklist grande + registros) */
.modal-ov { position: fixed; inset: 0; background: rgba(20, 22, 26, .45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-box { background: var(--shaa-surface); border-radius: 16px; width: min(860px, 100%); max-height: 88vh; overflow: auto; padding: 18px 20px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.modal-head b { font-size: 17px; }
.modal-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--shaa-muted); cursor: pointer; padding: 0 4px; }
.modal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.modal-grid label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--shaa-muted); }
.modal-grid select, .modal-grid input { padding: 7px 9px; border: 1px solid var(--shaa-hairline); border-radius: 8px; background: var(--shaa-surface); color: var(--shaa-ink); font: inherit; }
.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.modal-col h3 { font-size: 13px; margin: 0 0 8px; color: var(--shaa-ink); }
.reg-it { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 0; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.reg-it > span { grid-column: 1; }
.reg-it small { grid-column: 1; color: var(--shaa-muted); font-size: 11px; }
.reg-it .reg-x { grid-column: 2; grid-row: 1 / span 2; background: none; border: 0; color: var(--shaa-muted); font-size: 18px; cursor: pointer; }
.reg-it .reg-x:hover { color: #A32D2D; }
.reg-add { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.reg-add textarea { width: 100%; min-height: 54px; resize: vertical; padding: 8px; border: 1px solid var(--shaa-hairline); border-radius: 8px; background: var(--shaa-surface); color: var(--shaa-ink); font: inherit; }
.reg-add .btn { align-self: flex-start; }

/* Cronograma — diagrama + distribuição por usuário */
.cg-wrap { display: flex; flex-direction: column; overflow-x: auto; }
.cg-row { display: grid; grid-template-columns: 130px minmax(160px, 1.4fr) 64px 130px 130px minmax(160px, 1.6fr); gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; min-width: 840px; }
.cg-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--shaa-hairline); }
.cg-fase { font-weight: 700; font-size: 13px; margin: 12px 0 2px; color: var(--shaa-ink); }
.cg-row select, .cg-row input { padding: 6px 7px; font-size: 12px; border: 1px solid var(--shaa-hairline); border-radius: 7px; background: var(--shaa-surface); color: var(--shaa-ink); min-width: 0; }
.cg-title { cursor: pointer; color: var(--shaa-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-title:hover { text-decoration: underline; }
.cg-track { position: relative; height: 18px; background: var(--shaa-surface-soft); border-radius: 6px; }
.cg-bar { position: absolute; top: 3px; height: 12px; border-radius: 6px; background: var(--shaa-primary); border-left: 0; }
.cg-bar.pl-red { background: #C0392B; } .cg-bar.pl-yellow { background: #E0A41E; } .cg-bar.pl-green { background: #2E8B57; } .cg-bar.pl-done { background: #9aa1ad; }
.cg-nobar { font-size: 10px; color: var(--shaa-muted); padding-left: 4px; }
@media (max-width: 720px) {
  .modal-grid { grid-template-columns: 1fr 1fr; }
  .modal-cols { grid-template-columns: 1fr; }
}

/* Obra — cronograma físico + materiais */
.ob-crono, .ob-mat { display: flex; flex-direction: column; }
.ob-et { display: grid; grid-template-columns: 1fr 130px 130px 140px 80px; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.ob-et > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-mt { display: grid; grid-template-columns: 1fr 1fr 130px 130px 28px; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.ob-et-head, .ob-mt-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--shaa-hairline); }
.ob-et input, .ob-et select, .ob-mt input, .ob-mt select { padding: 6px 8px; font-size: 13px; border-radius: 8px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: var(--shaa-ink); min-width: 0; }
.ob-late { background: #FCEBEB; border-radius: 8px; }
@media (max-width: 720px) {
  .ob-et { grid-template-columns: 1fr 110px 70px; }
  .ob-et > .ob-fim, .ob-et-head > span:nth-child(3), .ob-et > .ob-st, .ob-et-head > span:nth-child(4) { display: none; }
  .ob-mt { grid-template-columns: 1fr 120px 26px; }
  .ob-mt > .mt-forn, .ob-mt-head > span:nth-child(2), .ob-mt > .mt-prev, .ob-mt-head > span:nth-child(4) { display: none; }
}
.kb-x { position: absolute; top: 6px; right: 6px; background: none; border: 0; color: var(--shaa-muted); cursor: pointer; font-size: 12px; }
.kb-prog { height: 5px; background: var(--shaa-surface-soft); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.kb-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--shaa-primary), var(--shaa-teal)); }
.kb-items { margin-top: 10px; border-top: 1px solid var(--shaa-hairline); padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.kb-it { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.kb-it small { margin-left: auto; color: var(--shaa-muted); font-size: 11px; white-space: nowrap; }
.kb-it-add { display: flex; gap: 6px; margin-top: 4px; }
.kb-it-add input { flex: 1; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; font-size: 12px; }
.kb-x:hover { color: #A32D2D; }
@media (max-width: 800px) { .kb-board { grid-template-columns: 1fr 1fr; } }

/* ---- Cronograma (gantt) ---- */
.gt-wrap { position: relative; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 34px 16px 16px; }
.gt-ruler { position: absolute; inset: 8px 16px auto 16px; height: 18px; }
.gt-tick { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--shaa-muted); }
.gt-today { position: absolute; top: 28px; bottom: 12px; width: 2px; background: var(--shaa-primary); opacity: .8; z-index: 2; }
.gt-team { font: 700 12px/1 Inter, system-ui; letter-spacing: .1em; text-transform: uppercase; color: var(--shaa-primary); margin: 14px 0 6px; }
.gt-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.gt-label { flex: 0 0 180px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-track { position: relative; flex: 1; height: 16px; background: var(--shaa-surface-soft); border-radius: 999px; }
.gt-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 999px; background: linear-gradient(90deg, var(--shaa-primary), var(--shaa-teal)); min-width: 8px; }
.gt-bar.gt-done { background: #1AAE39; }
.gt-bar.gt-late { background: linear-gradient(90deg, #DD5B00, #E5484D); }
@media (max-width: 680px) { .gt-label { flex-basis: 110px; } }

/* ---- Downloads center ---- */
.bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.dl-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dl-top { display: flex; gap: 10px; align-items: flex-start; }
.dl-icon { font-size: 24px; line-height: 1; }
.dl-desc { color: var(--shaa-ink-secondary); font-size: 13px; flex: 1; }
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.dl-form input, .dl-form select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: inherit; }
.dl-form #d-name, .dl-form #d-desc, .dl-form #d-add { grid-column: 1 / -1; }
.st-pending  { background: var(--shaa-surface-soft); color: var(--shaa-muted); }
.st-progress { background: #E6F1FB; color: #005BAB; }
.st-await    { background: #FBEAD7; color: #8A4B00; }
.st-approved { background: #E1F5EE; color: #0F6E56; }
.st-changes  { background: #FCEBEB; color: #A32D2D; }
.progress { height: 6px; background: var(--shaa-surface-soft); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--shaa-primary), var(--shaa-teal)); transition: width .3s; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 5px 7px; border-radius: 8px; color: var(--shaa-ink-secondary); }
.step .mark { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: var(--shaa-surface-soft); color: var(--shaa-muted); flex: none; }
.step.st-in_progress .mark { background: #E6F1FB; color: #005BAB; }
.step.st-done .mark { background: #E1F5EE; color: #0F6E56; }
.step.st-done { color: #0F6E56; }
.step.clk { cursor: pointer; }
.step.clk:hover { background: var(--shaa-surface-soft); }
.phase-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.phase-actions .btn { font-size: 12px; padding: 7px 12px; }

/* 15 milestones strip */
.marcos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.marco { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--shaa-hairline); font: 700 12px/1 system-ui; color: var(--shaa-ink-secondary); background: var(--shaa-surface-soft); cursor: pointer; }
.marco.m-contr:not(.done) { border-color: #5B3A8C; }
.marco.m-fim:not(.done) { border-color: var(--shaa-ink); }
.marco.m-princ.done { background: #DD5B00; border-color: #DD5B00; color: #fff; }
.marco.m-contr.done { background: #5B3A8C; border-color: #5B3A8C; color: #fff; }
.marco.m-fim.done { background: var(--shaa-ink); border-color: var(--shaa-ink); color: #fff; }
.gate { font-size: 9px; background: #FBEAD7; color: #8A4B00; padding: 1px 6px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.phase-date { font-size: 11px; color: var(--shaa-muted); margin-left: 10px; white-space: nowrap; }
.date-in { width: auto; background: var(--shaa-surface); color: var(--shaa-ink); border: 1px solid var(--shaa-hairline); border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 11px; }

/* Cost sheet */
.cost-table { display: flex; flex-direction: column; border: 1px solid var(--shaa-hairline); border-radius: 12px; overflow: hidden; }
.cost-row { display: grid; grid-template-columns: 1.2fr 2.4fr 0.6fr 0.7fr 1fr 1fr 0.3fr; gap: 6px; padding: 6px 10px; align-items: center; border-bottom: 1px solid var(--shaa-hairline); }
.cost-row:last-child { border-bottom: 0; }
.cost-head { background: var(--shaa-surface-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--shaa-muted); }
.cost-row .ci { width: 100%; padding: 5px 6px; font-size: 12px; }
.cell-total { font-weight: 700; }
.cost-foot { text-align: right; padding: 10px 4px; }
.cost-foot b { color: #0F6E56; font-size: 16px; }
.xrm { padding: 2px 8px; }

/* Image configurator (tags na imagem) */
.ib-canvas { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--shaa-surface-soft) center / cover no-repeat; border: 1px solid var(--shaa-hairline); border-radius: 14px; display: flex; overflow: hidden; }
.ib-pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 2px solid #fff; background: #fff; color: #111; font: 700 11px/1 system-ui; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.45); white-space: nowrap; }
.ib-pin.off { opacity: .45; filter: grayscale(.6); }
.ib-thumb { width: 18px; height: 18px; border-radius: 50%; background: #ddd center / cover no-repeat; display: inline-block; }
.ib-pin.cat-mobiliario { border-color: #0075DE; }
.ib-pin.cat-iluminacao { border-color: #DD5B00; }
.ib-pin.cat-cores { border-color: #FF64C8; }
.ib-pin.cat-revestimento { border-color: #1AAE39; }
.ib-total { margin-top: 10px; }
.ib-total b { color: #0F6E56; font-size: 16px; }

/* Affiliates */
.aff-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--shaa-muted); margin: 16px 0 8px; }
.aff-partners { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.aff-row { display: grid; grid-template-columns: 2fr 1fr 1.6fr; gap: 10px; align-items: center; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 11px; padding: 10px 12px; }
.aff-name b { font-size: 14px; }
.aff-f { display: flex; flex-direction: column; font-size: 10px; color: var(--shaa-muted); gap: 3px; }
.aff-f input { font-size: 12px; }
.aff-link { margin-top: 8px; word-break: break-all; }
.aff-link a { color: var(--shaa-primary); }

/* CEP + BIM */
.cep-bar { font-size: 13px; color: var(--shaa-muted); margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cep-bar input { background: var(--shaa-surface); color: var(--shaa-ink); border: 1px solid var(--shaa-hairline); border-radius: 8px; padding: 6px 8px; font: inherit; }
.cep-bar b { color: #0F6E56; }
.bim-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.bim-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; background: #E6F1FB; color: #005BAB; border-radius: 5px; padding: 2px 6px; }

/* 4 widgets */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 6px; }
.pm-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px 16px; }
.pm-card h3 { margin: 0 0 10px; font-size: 14px; }
.pm-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 9px; background: var(--shaa-surface-soft); border: 1px solid var(--shaa-hairline); border-radius: 9px; font-size: 13px; }
.pm-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pm-form input { flex: 1; min-width: 90px; font-size: 12px; }
.pm-form .btn { font-size: 12px; padding: 7px 10px; }
.pm-f { display: flex; flex-direction: column; font-size: 11px; color: var(--shaa-muted); gap: 3px; margin-bottom: 8px; }
.pm-dl-act { display: flex; gap: 6px; }
.pm-dl-act .btn { font-size: 11px; padding: 5px 9px; }
.farol { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.f-green { background: #34d399; } .f-yellow { background: #fbbf24; } .f-red { background: #f87171; } .f-blue { background: #60a5fa; } .f-gray { background: #6b7280; }

/* Brand / appearance */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; max-width: 160px; border-radius: 8px; object-fit: contain; }
.appearance { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.appearance > b { width: 100%; font-size: 13px; }
.ap-f { display: flex; flex-direction: column; font-size: 11px; color: var(--shaa-muted); gap: 4px; }
.ap-f input { width: auto; }
.ap-f input[type="color"] { width: 46px; height: 32px; padding: 0; border: 1px solid var(--shaa-hairline); border-radius: 8px; background: none; cursor: pointer; }

/* Help balloons on section titles */
h2[data-tip] { display: flex; align-items: center; gap: 8px; }
h2[data-tip]::before { content: "\f05a"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 13px; color: var(--shaa-primary); cursor: help; }
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: 100%; margin-top: 6px; z-index: 60;
  background: var(--shaa-surface); color: var(--shaa-ink-secondary); border: 1px solid var(--shaa-hairline); border-radius: 10px;
  padding: 10px 12px; width: max-content; max-width: 380px;
  font: 400 12px/1.5 system-ui; box-shadow: var(--shaa-shadow-md); white-space: normal;
}

/* Team area (Vobi-style) */
#app:has(.tm-shell) { max-width: none; padding: 0; }
.tm-shell { display: flex; min-height: 100vh; }
.tm-side { width: 240px; flex: none; background: var(--shaa-surface); border-right: 1px solid var(--shaa-hairline); display: flex; flex-direction: column; padding: 16px 10px; gap: 4px; }
.tm-brand { font-size: 14px; padding: 6px 10px 14px; }
.tm-navbtn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: var(--shaa-ink-secondary); font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tm-navbtn:hover { background: var(--shaa-surface-soft); }
.tm-navbtn.active { background: var(--shaa-primary); color: #fff; }
.tm-side #tm-logout { margin-top: auto; }
.tm-main { flex: 1; padding: 28px 32px; overflow: auto; }
.tm-main h1 { font-size: 24px; margin: 0 0 4px; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.tm-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 16px; }
.tm-card h3 { margin: 0 0 6px; }
.tm-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.tm-f { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--shaa-muted); text-transform: capitalize; flex: 1; min-width: 140px; }
.tm-in { background: var(--shaa-surface); color: var(--shaa-ink); border: 1px solid var(--shaa-hairline); border-radius: 8px; padding: 8px; font: inherit; font-size: 13px; }
.tm-ta { min-height: 56px; resize: vertical; }
.tm-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--shaa-success); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 100; }
.studies { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 8px; }
.study { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.study input { width: auto; }

/* Purchases ("compras da obra") */
.buy-total { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.buy-total b { color: #0F6E56; font-size: 17px; }
.buy-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.buy-form input { flex: 1; min-width: 120px; width: auto; }
.buy-form input[data-k="price"], .buy-form input[data-k="qty"] { max-width: 110px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.buy-card { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.buy-img { height: 130px; background-size: cover; background-position: center; background-color: var(--shaa-surface-soft); }
.buy-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.buy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.buy-price { font-size: 14px; }
.buy-price b { color: var(--shaa-ink); }
.buy-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.buy-actions .btn { font-size: 12px; padding: 7px 12px; }

/* ---- CPU (Composição de Preço Unitário) ---- */
.cpu-box { grid-column: 1 / -1; background: var(--shaa-surface-soft); border: 1px dashed var(--shaa-hairline); border-radius: 10px; padding: 10px 12px; margin: 2px 0 8px; }
.cpu-sec { margin: 8px 0 4px; font-size: 12.5px; }
.cpu-line { display: grid; grid-template-columns: 2fr 0.8fr 0.9fr 1fr 0.3fr; gap: 6px; align-items: center; margin-bottom: 4px; }
.cpu-line.cpu-mat { grid-template-columns: 0.25fr 2fr 0.8fr 0.5fr 0.9fr 1fr 0.3fr; }
.cpu-line input { width: 100%; padding: 5px 6px; font-size: 12px; }
.cpu-letter { font-weight: 800; color: var(--shaa-primary); text-align: center; }
.cpu-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12.5px; }
.cpu-foot input { padding: 5px 6px; font-size: 12px; }

/* ===== App shell + sidebar fixa (estilo Notion/Vobi) ===== */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.app-side { width: 250px; flex: none; background: var(--shaa-surface); border-right: 1px solid var(--shaa-hairline); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-side:empty { display: none; }
.app-main { flex: 1; min-width: 0; }
.app-shell #app { max-width: 1080px; margin: 0 auto; padding: 30px 28px 80px; }
.app-shell:has(.tm-shell) .app-side { display: none; }       /* a área de equipe tem sidebar própria */
.app-shell:has(.tm-shell) #app { max-width: none; padding: 0; }

.as-brand { display: flex; align-items: center; gap: 10px; font-family: var(--shaa-font-display); font-weight: 800; font-size: 15px; letter-spacing: -.3px; color: var(--shaa-ink); text-decoration: none; padding: 4px 8px 12px; }
.as-logo { width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--shaa-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.as-nav { display: flex; flex-direction: column; gap: 1px; }
.as-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--shaa-faint); padding: 15px 10px 5px; }
.as-link { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: 0; color: var(--shaa-ink-secondary); font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.as-link i { width: 18px; flex: none; text-align: center; color: var(--shaa-muted); font-size: 14px; }
.as-link:hover { background: var(--shaa-surface-soft); }
.as-link.active { background: var(--shaa-primary-soft); color: var(--shaa-primary-hover); font-weight: 600; }
.as-link.active i { color: var(--shaa-primary); }
.as-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--shaa-hairline); margin-top: auto; }
.as-foot .as-link { color: var(--shaa-muted); }
@media (max-width: 880px) {
  .app-side { width: 60px; padding: 14px 6px; }
  .as-brand > span:last-child, .as-link span, .as-group { display: none; }
  .as-brand { justify-content: center; padding: 4px 0 12px; }
  .as-link { justify-content: center; padding: 11px 0; }
  .app-shell #app { padding: 22px 16px 70px; }
}

/* ===== Cronograma (calendário que une as tarefas) ===== */
.cr-month { font-size: 15px; min-width: 150px; text-align: center; }
.cr-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.cr-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.cr-key.cr-task { background: var(--shaa-primary-soft); color: #005BAB; }
.cr-key.cr-deadline { background: #FBEAD7; color: #8A4B00; }
.cr-key.cr-meeting { background: #EFE6FA; color: #5B3A8C; }
.cr-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cr-wd > div { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--shaa-faint); text-align: center; }
.cr-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cr-cell { min-height: 92px; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cr-cell.cr-empty { background: transparent; border: 0; }
.cr-cell.cr-today { border-color: var(--shaa-primary); box-shadow: var(--shaa-focus); }
.cr-daynum { font-size: 12px; font-weight: 600; color: var(--shaa-muted); }
.cr-cell.cr-today .cr-daynum { color: var(--shaa-primary); }
.cr-pill { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 3px 7px; border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-pill i { font-size: 9px; flex: none; }
.cr-pill.cr-task { background: var(--shaa-primary-soft); color: #005BAB; }
.cr-pill.cr-deadline { background: #FBEAD7; color: #8A4B00; }
.cr-pill.cr-meeting { background: #EFE6FA; color: #5B3A8C; }
.cr-pill.cr-done { opacity: .55; text-decoration: line-through; }
@media (max-width: 720px) {
  .cr-cell { min-height: 64px; }
  .cr-pill { font-size: 10px; }
}

/* ===== Custos (Gestor de custos) ===== */
.bar-actions { display: flex; gap: 8px; }
.cu-card { margin-bottom: 4px; }
.cu-ctx { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 12px 16px; margin-top: 12px; }
.cu-ctx label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cu-ctx select, .cu-ctx input { width: auto; min-width: 90px; padding: 8px 10px; }
.cu-ctx select { background: var(--shaa-surface); color: var(--shaa-ink); border: 1px solid var(--shaa-hairline); border-radius: 9px; font: inherit; }

.cu-bdi-out { font-size: 14px; }
.cu-bdi-out b { color: var(--shaa-primary); }
.cu-bdi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.cu-bdi-grid label { margin: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px; }
.cu-bdi-grid input { grid-column: 1 / -1; padding: 8px 10px; }
.cu-bdi-grid span { grid-row: 1; grid-column: 2; color: var(--shaa-muted); }

#cu-results { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.cu-res { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--shaa-hairline); border-radius: 9px; font-size: 13px; background: var(--shaa-surface-soft); }
.cu-res > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-res .cu-u { color: var(--shaa-muted); font-size: 12px; white-space: nowrap; }
.cu-res .cu-add { padding: 5px 9px; }
.cu-code { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12px; color: var(--shaa-primary); white-space: nowrap; }

/* Etapas (EAP Bora na Obra) */
.cu-etapa { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 6px 14px 10px; margin-bottom: 10px; }
.cu-et-head { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 2px; }
.cu-et-code { font-weight: 700; color: var(--shaa-primary); font-variant-numeric: tabular-nums; }
.cu-et-name { font-weight: 600; color: var(--shaa-ink); }
.cu-et-sub { color: var(--shaa-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cu-et-add { padding: 6px 11px; font-size: 12px; }
.cu-empty { margin: 2px 2px 6px; font-style: italic; }
.cu-et-panel { background: var(--shaa-surface-soft); border: 1px solid var(--shaa-hairline); border-radius: 10px; padding: 10px; margin: 4px 0 8px; }
.cu-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cu-add-sub { flex: 0 0 auto; max-width: 230px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: var(--shaa-ink); font: inherit; }
.cu-add-q { flex: 1; min-width: 180px; }
.cu-add-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }

.cu-items { margin: 4px 0 2px; }
.cu-it { display: grid; grid-template-columns: 66px 1fr 56px 60px 72px 90px 100px 26px 26px; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-it > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-it-cli { background: #FBF7EC; border-radius: 8px; }
.cu-subc { color: var(--shaa-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.cu-tag-d { display: inline-block; margin-left: 5px; font-size: 9px; font-weight: 700; color: #fff; background: #8A5A00; border-radius: 4px; padding: 1px 4px; vertical-align: middle; }
.cu-star { background: none; border: 0; cursor: pointer; color: var(--shaa-hairline); font-size: 13px; padding: 2px; }
.cu-star.on { color: #E0A41E; }
.cu-aprov { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; }
.cu-aprov label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cu-aprov select, .cu-aprov input { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--shaa-hairline); background: var(--shaa-surface); color: var(--shaa-ink); font: inherit; }
.cu-aprov .cu-stat { padding: 8px 12px; }
.cu-aprov .cu-stat b { font-size: 16px; }
.cu-apv { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--shaa-hairline); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.cu-apv-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cu-apv-nums .cu-stat { padding: 10px 12px; }
.cu-apv-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.cu-apv .cu-verdict { padding: 12px 14px; }
.cu-it-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--shaa-hairline); }
.cu-it input { padding: 6px 8px; font-size: 13px; }
.cu-it .cu-tot { text-align: right; font-variant-numeric: tabular-nums; }
.cu-del { background: none; border: 0; color: var(--shaa-muted); cursor: pointer; font-size: 14px; padding: 4px; }
.cu-del:hover { color: #A32D2D; }
.cu-direto { text-align: right; padding: 8px 6px 0; font-size: 14px; }
.cu-direto b { color: var(--shaa-ink); font-variant-numeric: tabular-nums; }

.cu-resumo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cu-stat { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.cu-stat span { font-size: 12px; color: var(--shaa-muted); }
.cu-stat b { font-size: 20px; color: var(--shaa-ink); font-variant-numeric: tabular-nums; }
.cu-stat-hl { background: var(--shaa-primary); border-color: var(--shaa-primary); }
.cu-stat-hl span, .cu-stat-hl b { color: #fff; }

.cu-abc-row { display: grid; grid-template-columns: 28px 70px 1fr 110px 56px; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-abc-row > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-abc-row > span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.cu-abc-fa { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.cu-fa-A { background: #C0392B; } .cu-fa-B { background: #E08A1E; } .cu-fa-C { background: #6B7280; }

/* EVF — viabilidade */
.cu-evf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; color: var(--shaa-ink); margin-bottom: 10px; }
.cu-evf-head .badge b { color: var(--shaa-primary); }
.cu-evf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cu-evf-grid label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cu-evf-grid .cu-stat { padding: 8px 12px; }
.cu-evf-grid .cu-stat b { font-size: 16px; }
.cu-fases { display: flex; flex-direction: column; }
.cu-fase { display: grid; grid-template-columns: 1fr 90px 110px 28px; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-fase-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--shaa-hairline); }
.cu-fase input { padding: 6px 8px; font-size: 13px; }
.cu-fase .cf-val { text-align: right; font-variant-numeric: tabular-nums; }
.cu-evf-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-evf-foot b { color: var(--shaa-ink); font-variant-numeric: tabular-nums; }
.cu-inline { margin: 0 !important; display: inline-flex; align-items: center; gap: 6px; color: var(--shaa-muted); }
.cu-inline input { width: 64px; padding: 6px 8px; }
.cu-hl b { color: var(--shaa-primary); }

.cu-viab { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 4px; }
.cu-viab-lines { background: var(--shaa-surface); border: 1px solid var(--shaa-hairline); border-radius: 14px; padding: 14px 16px; }
.cu-viab-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--shaa-hairline); font-size: 14px; }
.cu-viab-lines > div b { font-variant-numeric: tabular-nums; color: var(--shaa-ink); }
.cu-viab-total { border-bottom: 0 !important; font-weight: 700; font-size: 16px !important; margin-top: 2px; }
.cu-viab-total b { color: var(--shaa-primary); }
.cu-viab-m2 { border-bottom: 0 !important; color: var(--shaa-muted); }
.cu-viab-side { display: flex; flex-direction: column; gap: 10px; }
.cu-viab-side label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--shaa-muted); }
.cu-verdict { flex: 1; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; border: 1px solid var(--shaa-hairline); }
.cu-vd-tag { font-size: 19px; font-weight: 800; }
.cu-vd-num { font-size: 13px; } .cu-vd-num b { font-variant-numeric: tabular-nums; }
.cu-vd-ok { background: #E1F5EE; border-color: #A6E0CC; } .cu-vd-ok .cu-vd-tag { color: #0F6E56; }
.cu-vd-warn { background: #FBF1DD; border-color: #F0D9A8; } .cu-vd-warn .cu-vd-tag { color: #8A5A00; }
.cu-vd-bad { background: #FCEBEB; border-color: #F2C4C4; } .cu-vd-bad .cu-vd-tag { color: #A32D2D; }
.cu-vd-muted .cu-vd-tag { color: var(--shaa-muted); font-size: 15px; font-weight: 600; }
.cu-vd-study { background: var(--shaa-surface-soft); }
.cu-vd-lbl { font-size: 11px; color: var(--shaa-muted); text-transform: uppercase; letter-spacing: .04em; }

/* BDI — detalhamento (Fundador) + parâmetros (Planejador) */
.cu-bdi-det { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--shaa-hairline); }
.cu-bd-row { display: grid; grid-template-columns: 1fr 70px 90px 120px; gap: 8px; align-items: center; padding: 5px 2px; font-size: 13px; border-bottom: 1px solid var(--shaa-hairline); }
.cu-bd-row > span:nth-child(2), .cu-bd-row > span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.cu-bd-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.cu-bd-tot { font-weight: 700; border-top: 2px solid var(--shaa-hairline); border-bottom: 0; }
.cu-bd-tot > span:nth-child(2) { color: var(--shaa-primary); }
.cu-bd-pv { font-weight: 700; border-bottom: 0; }
.cu-bd-pv > span:last-child { color: var(--shaa-primary); }
.cu-bdi-gestor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cu-bdi-gestor > div { display: flex; flex-direction: column; gap: 4px; background: var(--shaa-surface-soft); border: 1px solid var(--shaa-hairline); border-radius: 12px; padding: 12px 14px; }
.cu-bdi-gestor span { font-size: 12px; color: var(--shaa-muted); display: flex; align-items: center; gap: 6px; }
.cu-bdi-gestor b { font-size: 18px; color: var(--shaa-ink); font-variant-numeric: tabular-nums; }
.cu-bdi-gestor .cu-tbd { font-size: 14px; font-weight: 600; color: #8A5A00; }

/* Equipe (Fundador) */
.cu-h2-tag { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--shaa-muted); margin-left: 8px; }
.cu-eqa, .cu-exl { display: flex; flex-direction: column; }
.cu-eqa-row { display: grid; grid-template-columns: 1fr 0.8fr 92px 54px 54px 60px 96px 24px; gap: 6px; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-eqa-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--shaa-hairline); }
.cu-eqa-row input { padding: 6px 7px; font-size: 13px; min-width: 0; }
.cu-eqa-row .eq-custo { text-align: right; font-variant-numeric: tabular-nums; }
.cu-ex-row { display: grid; grid-template-columns: 1fr 130px 24px; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid var(--shaa-hairline); font-size: 13px; }
.cu-ex-head { color: var(--shaa-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--shaa-hairline); }
.cu-ex-row input { padding: 6px 8px; font-size: 13px; min-width: 0; }

@media (max-width: 720px) {
  .cu-evf-grid { grid-template-columns: 1fr 1fr; }
  .cu-viab { grid-template-columns: 1fr; }
  .cu-eqa-row { grid-template-columns: 1fr 80px 48px 60px 84px 22px; }
  .cu-eqa-row .eq-cargo, .cu-eqa-head > span:nth-child(2), .cu-eqa-row > input:nth-child(5), .cu-eqa-head > span:nth-child(5) { display: none; }
  .cu-bdi-gestor { grid-template-columns: 1fr; }
  .cu-bd-row { grid-template-columns: 1fr 56px 100px; }
  .cu-bd-row > span:nth-child(3) { display: none; }
  .cu-bdi-grid { grid-template-columns: 1fr 1fr; }
  .cu-resumo { grid-template-columns: 1fr 1fr; }
  .cu-it { grid-template-columns: 52px 1fr 52px 72px 82px 22px 22px; }
  .cu-it .cu-subc, .cu-it-head > span:nth-child(3) { display: none; }
  .cu-it > input.cu-unit, .cu-it-head > span:nth-child(4) { display: none; }
  .cu-aprov { grid-template-columns: 1fr 1fr; }
  .cu-apv { grid-template-columns: 1fr; }
  .cu-et-head { grid-template-columns: 28px 1fr auto; }
  .cu-et-add { grid-column: 1 / -1; justify-self: start; }
}
