/* Painel administrativo */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--nav); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; color: #fff; font-weight: 600; }
.side .logo { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.side a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: var(--radius); color: var(--nav-ink); text-decoration: none; }
.side a:hover { background: #1E2129; color: #fff; }
.side a[aria-current="page"] { background: var(--nav-active); color: #fff; font-weight: 500; }
.side .count { margin-left: auto; font-size: 12px; background: var(--accent); color: #fff; padding: 0 7px; border-radius: 999px; }
.side .me { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.side .me a { color: #8A919E; }
.side .avatar { box-shadow: 0 0 0 1.5px #4A505C; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.three { grid-template-columns: 1fr; } }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 820px) {
  .side { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side .brand { padding: 0 8px; width: 100%; }
  .side .me { margin: 0; padding: 0; flex-direction: row; }
  .main { padding: 16px; }
}
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* Quadro Kanban */
.board-scroll { overflow-x: auto; padding-bottom: 8px; }
.board { display: flex; gap: 14px; align-items: flex-start; min-width: min-content; }
.col { flex: 1 0 214px; max-width: 340px; background: #EBEDF1; border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; transition: background .12s; }
.col.over { background: #DCE5FD; outline: 2px dashed var(--accent); outline-offset: -2px; }
.col.over-resolve { background: #DDF2E5; outline: 2px dashed var(--good); outline-offset: -2px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.col-head h2 { font-size: 14px; }
.col-head .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.tcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--ink); cursor: grab; }
.tcard:hover { border-color: var(--accent-border); color: var(--ink); }
.tcard.dragging { opacity: .45; }
.tcard .title { font-weight: 500; line-height: 1.35; }
.tcard .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.tcard .foot > span:not(.avatar):not(.spacer) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tcard .foot > span:last-child { flex: none; }
.sla-late { color: var(--danger) !important; font-weight: 600; }
.sla-soon { color: var(--warn) !important; font-weight: 600; }
.drop-hint { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px dashed var(--good); border-radius: 10px; color: var(--good); font-size: 13px; font-weight: 600; background: #F2FAF5; text-align: center; padding: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .select, .filters .input { height: 38px; width: auto; }
.filters .input { width: 260px; max-width: 100%; }

/* Detalhe */
.detail-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.detail-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.composer { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius-lg); overflow: hidden; }
.composer.note { border-color: var(--note-border); }
.composer .ctabs { display: flex; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.composer .ctabs button { height: 44px; padding: 0 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-weight: 600; color: var(--muted); cursor: pointer; }
.composer .ctabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.composer.note .ctabs button[aria-selected="true"] { color: #8A4B00; border-bottom-color: #B45309; }
.composer .cbody { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.composer.note .cbody { background: var(--note); }
dl.facts-list { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); row-gap: 10px; column-gap: 12px; font-size: 13px; }
dl.facts-list dt { color: var(--muted); }
dl.facts-list dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline li { display: flex; gap: 10px; font-size: 13px; }
.timeline .dot { margin-top: 6px; }
.status-select { font-weight: 600; }

/* Gráficos simples */
.bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; border-bottom: 1px solid var(--border); padding: 0 4px; }
.bars .wk { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.bars .b { width: 40%; max-width: 18px; border-radius: 3px 3px 0 0; min-height: 2px; }
.bars-labels { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; padding: 0 4px; font-size: 11.5px; color: var(--muted); text-align: center; }
.hbar { height: 10px; background: var(--divider); border-radius: 5px; }
.hbar > div { height: 10px; background: var(--accent); border-radius: 5px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Login */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 420px; background: var(--nav); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-brand h2 { font-size: 34px; line-height: 1.2; max-width: 460px; }
.auth-main { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-main form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 640px) { .auth-brand { padding: 28px; } .auth-brand h2 { font-size: 24px; } }

.secret-box { font-family: var(--mono); font-size: 13px; padding: 12px 14px; background: var(--ink); color: #E9ECF0; border-radius: var(--radius); word-break: break-all; white-space: pre-wrap; }
.list-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--divider); text-decoration: none; color: var(--ink); cursor: pointer; background: var(--surface); border-left: 3px solid transparent; width: 100%; text-align: left; font: inherit; border-right: 0; border-bottom: 0; }
.list-item[aria-current="true"] { background: #F7F9FF; border-left-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip:has(input:checked) { border-color: var(--accent-border); background: var(--accent-tint); color: var(--accent-ink); }
.chip input { margin: 0; accent-color: var(--accent); }
.var-btn { height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--accent-border); background: var(--accent-tint); color: var(--accent-ink); font-family: var(--mono); font-size: 12px; cursor: pointer; }
