/* Componentes — ver IDENTIDADE-VISUAL.md secao 6 */

/* ---------- Botões ---------- */
.btn-primary, .btn-ghost, .btn-outline, .btn-destructive {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:disabled, .btn-ghost:disabled, .btn-outline:disabled, .btn-destructive:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn-primary {
  background: var(--color-brand);
  color: var(--ap-accent-fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover { background: var(--color-brand-hover); box-shadow: var(--shadow-brand); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost { background: transparent; color: var(--color-subtle); }
.btn-ghost:hover { background: var(--color-panel); color: var(--color-heading); }
.btn-ghost:active { transform: scale(0.97); }

.btn-outline {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-body);
  box-shadow: var(--shadow-soft-sm);
}
.btn-outline:hover { background: var(--color-panel); border-color: var(--color-muted); }
.btn-outline:active { transform: scale(0.97); }

/* Centralizada aqui (a identidade de origem documenta a ausência disto e
   recomenda criá-la — ver SPEC.md §3) */
.btn-destructive { background: rgba(220,38,38,0.1); color: var(--color-error); }
.btn-destructive:hover { background: rgba(220,38,38,0.2); }
.btn-destructive:active { transform: scale(0.97); }

/* ---------- Input ---------- */
.input {
  width: 100%;
  padding: 6px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--color-body);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:hover { border-color: var(--color-subtle); }
.input:focus { border-color: var(--color-brand); box-shadow: var(--shadow-brand); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }
.input::placeholder { color: var(--color-muted); }
.input-error { border-color: #f87171 !important; box-shadow: 0 0 0 1px rgba(248,113,113,0.3) !important; }

/* ---------- Card ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft-sm);
}
.card.clickable:hover { box-shadow: var(--shadow-soft); border-color: var(--color-subtle); cursor: pointer; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 5px;
  background: var(--color-panel);
  color: var(--color-subtle);
  border: 1px solid var(--color-border);
}

/* ---------- Shell: Topnav ---------- */
.topnav {
  height: 2.75rem;
  background: var(--color-nav-bg);
  border-bottom: var(--ap-border-width) solid var(--ap-top-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 24px;
  color: var(--ap-top-fg);
}
.topnav__brand { display: flex; align-items: center; gap: 8px; color: var(--ap-top-logo); font-weight: 600; font-size: 0.8125rem; }
.topnav__brand svg { flex-shrink: 0; }
.topnav__logo { height: 22px; max-width: 120px; object-fit: contain; border-radius: 3px; }
.topnav__tabs { display: flex; align-items: stretch; gap: 4px; height: 100%; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }   /* muitas abas em janela estreita: rolam dentro da barra, a página não rola */
.topnav__tabs::-webkit-scrollbar { display: none; }
.topnav__tab {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.8125rem;
  color: var(--ap-top-fg);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  height: 100%;
  flex-shrink: 0;
  white-space: nowrap;
}
.topnav__tab:hover { color: var(--ap-top-active); }
.topnav__tab.active { color: var(--ap-top-active); font-weight: 500; border-bottom-color: var(--color-brand); }
.topnav__more { position: relative; color: var(--ap-top-fg); cursor: pointer; padding: 0 8px; }
.topnav__right { flex-shrink: 0; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topnav__build {
  font-size: 0.6875rem;
  font-family: var(--font-geist-mono);
  color: #8a9bb8;
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 5px;
}
.topnav__user-avatar {
  width: 26px; height: 26px; border-radius: var(--radius-full);
  background: var(--color-brand);
  color: var(--ap-accent-fg); font-size: 0.6875rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- Shell: Sidebar ---------- */
.app-shell { display: flex; height: calc(100vh - 2.75rem); }
.sidebar {
  width: 14rem;
  background: var(--ap-side-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: width 0.15s ease;
}
.sidebar.collapsed { width: 2.5rem; }
.sidebar__header { padding: 8px 8px 8px 12px; display: flex; align-items: center; justify-content: space-between; }
.sidebar__title { color: var(--color-subtle); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar__toggle { padding: 2px 6px; font-size: 0.8125rem; }
.sidebar.collapsed .sidebar__title, .sidebar.collapsed .sidebar__nav, .sidebar.collapsed .sidebar__footer-name { display: none; }
.sidebar.collapsed .sidebar__header { justify-content: center; padding: 8px 0; }
.sidebar.collapsed .sidebar__footer { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar__toggle { transform: scaleX(-1); }
.sidebar__search { padding: 4px 4px 12px; }
.sidebar__results { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 4px 8px; }
.sidebar__item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-md);
  font-size: 0.8125rem; color: var(--ap-side-fg);
  text-decoration: none; cursor: pointer;
}
.sidebar__item:hover { background: var(--ap-side-hover); color: var(--color-heading); }
.sidebar__group { padding: 10px 12px 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-side-group); }
.sidebar__item--sub { padding-left: 24px; }
.sidebar__item.active { background: var(--ap-side-active-bg); color: var(--ap-side-active-fg); font-weight: 500; }
.sidebar__footer {
  border-top: 1px solid var(--color-border);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  position: relative;
}
.sidebar__footer:hover { background: var(--color-panel); }
.sidebar__footer-avatar {
  width: 24px; height: 24px; border-radius: var(--radius-full);
  background: var(--color-brand); color: var(--ap-accent-fg);
  font-size: 0.625rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar__footer-name { font-size: 0.75rem; color: var(--color-heading); flex: 1; }

.main-content { flex: 1; min-width: 0; overflow-y: auto; padding: 24px; max-width: calc(var(--content-scale, 1) * 100%); margin-inline: auto; }

/* ---------- Dropdown genérico (menu de usuário, footer, "···") ---------- */
.dropdown {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft-lg);
  min-width: 180px;
  padding: 6px;
  z-index: 50;
}
.dropdown__item {
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 0.8125rem; color: var(--color-body);
  cursor: pointer;
}
.dropdown__item:hover { background: var(--color-panel); }
.dropdown__item.destructive { color: var(--color-error); }

/* ---------- Empty state (ver também bloco de utilitários abaixo) ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 96px 0; gap: 12px; color: var(--color-subtle); font-size: 0.8125rem;
}

.topnav__user-avatar.has-img, .sidebar__footer-avatar.has-img { background-size: cover; background-position: center; }
.dropdown__item.disabled { opacity: 0.45; cursor: not-allowed; }
.dropdown { position: fixed; }

/* ---------- Utilitários ---------- */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* coluna de texto longo (justificativa, mensagem de pendência): quebra em várias linhas em vez de cortar com "…" (pedido do tester, Tipo novo 3.1/6.1) */
td.col-quebra .truncate { overflow: visible; text-overflow: clip; white-space: normal; word-break: break-word; min-width: 200px; max-width: 480px; }
.muted { color: var(--color-muted); }
.text-xs { font-size: 0.6875rem; }
.text-sm { font-size: 0.75rem; }
.btn-sm { padding: 3px 8px; font-size: 0.75rem; }
.btn-ghost--danger { color: var(--color-error); }
.btn-ghost--danger:hover { background: rgba(220,38,38,0.1); color: var(--color-error); }
.empty-state__icon { font-size: 1.75rem; }
.empty-state__title { font-weight: 600; color: var(--color-heading); font-size: 0.875rem; }
.empty-state { text-align: center; }

/* ---------- Página / cabeçalho ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-title { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: var(--color-heading); margin: 0; }
.page-sub { margin: 2px 0 0; font-size: 0.8125rem; color: var(--color-subtle); }

/* ---------- Toolbar / tabela / paginação ---------- */
.list-card { overflow: hidden; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.toolbar__search { flex: 1 1 220px; max-width: 360px; }
.toolbar__filter { width: auto; min-width: 140px; }
.toolbar__count { margin-left: auto; font-size: 0.75rem; color: var(--color-subtle); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table th { text-align: left; padding: 8px 12px; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--color-subtle); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.table th.th-sort { cursor: pointer; user-select: none; }
.table th.th-sort:hover { color: var(--color-heading); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--color-border); color: var(--color-body); max-width: 280px; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--color-panel); }
.table tr.row-click { cursor: pointer; }
.td-actions { text-align: right; white-space: nowrap; width: 1%; }
.pager { display: flex; gap: 4px; justify-content: center; padding: 10px; }
.pager:empty { display: none; }
.pager__cur { background: var(--color-brand-muted); color: var(--color-brand); font-weight: 600; }
.pager__gap { padding: 3px 4px; color: var(--color-muted); }
.badge-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Badges (variantes) ---------- */
.badge--success { background: rgba(22,163,74,0.12); color: var(--color-success); border-color: rgba(22,163,74,0.3); }
.badge--warning { background: rgba(217,119,6,0.12); color: var(--color-warning); border-color: rgba(217,119,6,0.3); }
.badge--error { background: rgba(220,38,38,0.1); color: var(--color-error); border-color: rgba(220,38,38,0.3); }
.badge--brand { background: var(--color-brand-muted); color: var(--color-brand); border-color: rgba(69,183,209,0.35); }

/* ---------- Skeleton ---------- */
.skeleton-wrap { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.skeleton { height: 18px; border-radius: var(--radius-sm); background: var(--color-panel); }
@keyframes pulse { 50% { opacity: .45; } }
.animate-pulse { animation: pulse 1.4s cubic-bezier(.4,0,.6,1) infinite; }

/* ---------- Formulários ---------- */
.form-card { padding: 20px; margin-bottom: 16px; }
.section-title { font-size: 0.875rem; font-weight: 600; color: var(--color-heading); margin: 0 0 14px; }
.section-subtitle { font-size: 0.75rem; font-weight: 600; color: var(--color-heading); text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.section-subtitle .muted { text-transform: none; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field--span2 { grid-column: span 2; }
.field--span3 { grid-column: 1 / -1; }
.field label { font-size: 0.75rem; font-weight: 500; color: var(--color-subtle); }
.field .req { color: var(--color-error); }
.field__hint { font-size: 0.6875rem; color: var(--color-muted); }
.field__error { font-size: 0.6875rem; color: var(--color-error); min-height: 0; }
.field.has-error .input { border-color: #f87171; box-shadow: 0 0 0 1px rgba(248,113,113,0.3); }
textarea.input { resize: vertical; font-family: inherit; }
select.input { padding-right: 24px; }
.field--check { justify-content: center; }
.check { display: inline-flex !important; align-items: center; gap: 8px; font-size: 0.8125rem !important; color: var(--color-body) !important; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--color-brand); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.perm-group { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 12px; }
.perm-group__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; font-size: 0.8125rem; color: var(--color-heading); }
.form-error { background: rgba(220,38,38,0.1); color: var(--color-error); border: 1px solid rgba(220,38,38,0.3); border-radius: var(--radius-md); padding: 8px 12px; margin-bottom: 12px; font-size: 0.8125rem; }
.details-sum { cursor: pointer; font-size: 0.75rem; color: var(--color-subtle); padding: 4px 0; }
.sticky-footer { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 12px 24px; background: var(--color-canvas); border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: 8px; z-index: 5; }
.sticky-footer .spacer { flex: 1; }
.dirty-flag { font-size: 0.75rem; color: var(--color-warning); }
.form-narrow { max-width: calc(var(--content-scale, 1) * 100%); margin-inline: auto; }
.strength { height: 4px; border-radius: 2px; background: var(--color-panel); overflow: hidden; margin-top: 4px; }
.strength > i { display: block; height: 100%; width: 0; background: var(--color-error); transition: width .15s, background .15s; }
.autocomplete { position: relative; }
.autocomplete__list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-soft-lg); max-height: 220px; overflow-y: auto; margin-top: 2px; }
.autocomplete__item { padding: 7px 10px; font-size: 0.8125rem; cursor: pointer; }
.autocomplete__item:hover, .autocomplete__item.active { background: var(--color-panel); }
.logo-box { display: flex; align-items: center; gap: 16px; }
.logo-box__img { width: 96px; height: 96px; border: 1px dashed var(--color-border); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--color-panel); color: var(--color-muted); font-size: 0.6875rem; text-align: center; }
.logo-box__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 16px; }
.tabs button { background: none; border: none; padding: 8px 12px; font-size: 0.8125rem; color: var(--color-subtle); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--color-heading); border-bottom-color: var(--color-brand); font-weight: 500; }

/* ---------- Toast ---------- */
.toast-area { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-border); border-left-width: 4px; box-shadow: var(--shadow-soft-lg); font-size: 0.8125rem; color: var(--color-body); }
.toast--success { border-left-color: var(--color-success); }
.toast--error { border-left-color: var(--color-error); }
.toast--info { border-left-color: var(--color-brand); }
.toast--warning { border-left-color: var(--color-warning); }
.toast__msg { flex: 1; }
.toast__close { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 1rem; line-height: 1; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: var(--ap-overlay); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-soft-xl); }
.modal__header { padding: 16px 20px 0; }
.modal__title { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--color-heading); }
.modal__body { padding: 12px 20px; overflow-y: auto; }
.modal__text { margin: 0; font-size: 0.8125rem; color: var(--color-body); line-height: 1.5; }
.modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--span3 { grid-column: 1 / -1; }
  .topnav { gap: 8px; padding: 0 8px; }
  .topnav__build { display: none; }
  .main-content { padding: 16px; }
  .sticky-footer { margin: 0 -16px -16px; padding: 12px 16px; bottom: -16px; }
}
@media (max-width: 600px) {
  .form-grid, .form-grid--2 { grid-template-columns: 1fr; }
  .field--span2, .field--span3 { grid-column: auto; }
  .sidebar { position: fixed; z-index: 30; height: calc(100vh - 44px); }
  .sidebar.collapsed { width: 40px; }
  .app-shell .main-content { margin-left: 40px; }
}
.back-link { font-size: 0.75rem; color: var(--color-subtle); text-decoration: none; display: inline-block; margin-bottom: 4px; }
.back-link:hover { color: var(--color-brand); }

[hidden] { display: none !important; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Guia do Usuário (markdown renderizado) ---------- */
.md { max-width: 860px; font-size: 0.875rem; line-height: 1.65; color: var(--color-body); }
.md h1 { font-size: 1.5rem; color: var(--color-heading); margin: 0 0 12px; }
.md h2 { font-size: 1.125rem; color: var(--color-heading); margin: 32px 0 10px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.md h3 { font-size: 0.9375rem; color: var(--color-heading); margin: 22px 0 8px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md a { color: var(--ap-link); }
.md img { max-width: 100%; height: auto; border: 1px solid var(--color-border); border-radius: 6px; margin: 4px 0 12px; display: block; }
.md code { font-family: var(--font-geist-mono); font-size: 0.75rem; background: var(--color-panel); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--color-panel); padding: 12px; border-radius: var(--radius-md); overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--color-brand); background: var(--color-panel); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.md hr { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }
.md-tabela { overflow-x: auto; margin: 0 0 14px; }
.md table { border-collapse: collapse; width: 100%; font-size: 0.8125rem; }
.md th { text-align: left; background: var(--color-panel); color: var(--color-heading); }
.md th, .md td { padding: 7px 10px; border: 1px solid var(--color-border); vertical-align: top; }

/* ---------- Visualizador de DXF ---------- */
.dxfv { display: flex; flex-direction: column; gap: 8px; }
.dxfv__bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dxfv__coord { margin-left: auto; font-family: var(--font-geist-mono); }
.dxfv__corpo { display: flex; gap: 10px; min-height: 420px; }
.dxfv__tela { flex: 1; min-height: 420px; height: 60vh; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.dxfv__tela { position: relative; }
.dxfv__canvas { display: block; cursor: grab; position: absolute; left: 0; top: 0; }
.dxfv__canvas.grabbing { cursor: grabbing; }
.dxfv__camadas { width: 220px; overflow-y: auto; max-height: 60vh; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 8px; }
.dxfv__cam { display: flex !important; gap: 6px; padding: 2px 0; font-size: 0.75rem !important; }
.dxfv__cam .truncate { flex: 1; }
@media (max-width: 900px) { .dxfv__corpo { flex-direction: column; } .dxfv__camadas { width: auto; max-height: 160px; } }

/* ---------- Contexto de obra ---------- */
.obra-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px; }
.obra-head__id { font-family: var(--font-geist-mono); font-size: 0.6875rem; color: var(--color-muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ws-card { position: relative; }
.ws-card__editar { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 1px solid var(--color-border); border-radius: var(--radius-sm, 6px); background: var(--color-surface); color: var(--color-subtle); cursor: pointer; opacity: 0; transition: opacity .12s; }
.ws-card:hover .ws-card__editar, .ws-card__editar:focus-visible { opacity: 1; }
.card--relative { position: relative; }
.card__remover { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 1px solid var(--color-border); border-radius: var(--radius-sm, 6px); background: var(--color-surface); color: var(--color-error); cursor: pointer; opacity: 0; transition: opacity .12s; }
.card--relative:hover .card__remover, .card__remover:focus-visible { opacity: 1; }
.stat { padding: 14px; } .stat__n { font-size: 1.5rem; font-weight: 600; color: var(--color-heading); } .stat__l { font-size: 0.75rem; color: var(--color-subtle); }
.totais-tabs { display: flex; gap: 4px; margin-bottom: 8px; } .totais-tabs button { padding: 3px 10px; font-size: 0.75rem; }
.progress { height: 6px; background: var(--color-panel); border-radius: 3px; overflow: hidden; margin: 8px 0; } .progress > i { display: block; height: 100%; background: var(--color-brand); width: 0; transition: width .15s; }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; } @media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* ---------- Roteiros de teste ---------- */
.progresso { height: 8px; background: var(--color-border); border-radius: 4px; overflow: hidden; }
.progresso > span { display: block; height: 100%; background: var(--color-success); }
.teste-thumb { position: relative; display: inline-block; }
.teste-thumb img { height: 64px; max-width: 120px; object-fit: cover; border: 1px solid var(--color-border); border-radius: 4px; cursor: zoom-in; background: var(--color-surface); }
.teste-thumb__x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; line-height: 0.875rem; padding: 0; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-panel); color: var(--color-error); cursor: pointer; }
.teste-drop { border: 1px dashed var(--color-border); border-radius: 4px; padding: 10px 12px; cursor: pointer; }
.teste-drop.over, .teste-drop:focus { border-color: var(--color-brand); outline: none; }

/* ===== Relatórios (SPEC_Relatorios) ===== */
.rel-filtros { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.rel-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rel-chip { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-body); border-radius: 99px; padding: 3px 12px; font-size: 0.75rem; cursor: pointer; }
.rel-chip.on { background: var(--color-nav-bg); border-color: var(--color-nav-bg); color: #fff; }
.rel-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rel-card { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-soft-sm); }
.rel-card:hover { border-color: var(--color-brand); box-shadow: var(--shadow-soft); }
.rel-card h4 { margin: 0; font-size: 0.875rem; color: var(--color-heading); }
.rel-card p { margin: 0; font-size: 0.75rem; color: var(--color-subtle); line-height: 1.4; }
.rel-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--color-brand-muted); display: grid; place-items: center; font-size: 1rem; }
.rel-ft { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.rel-star { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 1.125rem; color: var(--color-muted); cursor: pointer; }
.rel-star.on { color: var(--color-warning); }
.rel-aviso { border-left: 4px solid var(--color-warning); background: rgba(217, 119, 6, 0.08); padding: 8px 12px; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 0 0 12px; font-size: 0.8125rem; }
.rel-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.rel-params .f label { display: block; font-size: 0.75rem; color: var(--color-subtle); margin-bottom: 3px; }
.rel-check { display: flex; gap: 6px; align-items: center; font-size: 0.8125rem; }
.rel-emitir { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.rel-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.rel-previa { margin-top: 14px; }
.rel-frame { width: 100%; min-height: 420px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-soft); }
.rel-cot { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 8px; }
.rel-cot__l { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rel-modelos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Tabela com linhas separadas (SPEC_AjustePosRevit F6: Estoque) ---------- */
.table--separada { border-collapse: separate; border-spacing: 0 6px; }
.table--separada tbody tr td { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.table--separada tbody tr td:first-child { border-left: 1px solid var(--color-border); border-radius: 8px 0 0 8px; }
.table--separada tbody tr td:last-child { border-right: 1px solid var(--color-border); border-radius: 0 8px 8px 0; }
.table--separada tbody tr.est-grupo td { border-radius: 8px; }

/* ---------- Qualidade: cartão por item, botões de resposta grandes (celular/tablet) e barra de ação fixa (SPEC_AjustePosRevit D2) ---------- */
.qua-resp { display: flex; gap: 8px; flex-wrap: wrap; }
.qua-resp__op { flex: 1 1 140px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 2px solid var(--color-border); border-radius: 10px; cursor: pointer; text-align: center; font-weight: 600; background: var(--color-surface); }
.qua-resp__op input { position: absolute; opacity: 0; pointer-events: none; }
.qua-resp__op:has(input:checked) { color: #fff; }
.qua-resp__op--ok:has(input:checked) { background: #15803d; border-color: #15803d; }
.qua-resp__op--nok:has(input:checked) { background: #b91c1c; border-color: #b91c1c; }
.qua-resp__op--rest:has(input:checked) { background: #b45309; border-color: #b45309; }
.qua-resp__op--na:has(input:checked) { background: #6b7280; border-color: #6b7280; }
.qua-resp__op:has(input:focus-visible) { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.qua-barra { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-top: 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: var(--shadow-soft); }
@media (max-width: 768px) { .qua-barra button { min-height: 44px; flex: 1 1 140px; } .qua-resp__op { flex: 1 1 100%; } }

/* ---------- Mapa de inspeção ---------- */
.qua-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.qua-dot--vazio { border: 2px dashed var(--color-muted); }
.qua-celula { background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 8px; min-width: 36px; min-height: 36px; }
.qua-celula:hover, .qua-celula:focus-visible { background: var(--color-panel); outline: 2px solid var(--color-brand); }
.qua-mapa th { font-size: 0.75rem; }

/* ==========================================================
   Planejamento avançado — Gantt (SPEC_Planner §5.10). Só papéis/variáveis de cor.
   A altura da linha (--linha-gantt = 24px) é própria e NÃO muda com a escala de texto (RN-APA-09).
   ========================================================== */
.plan__faixa { padding: 6px 12px; border: 1px solid var(--ap-border); border-radius: var(--radius-md); background: var(--ap-panel); color: var(--ap-body); font-size: 0.8125rem; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan__faixa--edicao { background: var(--ap-accent-soft); border-color: var(--ap-accent); }
.plan__faixa--bloqueado { border-color: var(--dado-alerta); }
.plan__barra { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.plan__grupo { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.plan__grupo .input, .plan__grupo select.input { width: auto; max-width: 14rem; }
.input--sm { padding: 3px 8px; font-size: 0.8125rem; height: 1.9rem; min-width: 0; }
.plan__corpo { display: flex; gap: 0; align-items: stretch; min-height: 26rem; }
.plan__gantt { flex: 1; min-width: 0; height: calc(100vh - 17rem); min-height: 26rem; position: relative; }
.plan__host { height: 100%; }
.plan__painel { width: 26rem; flex: none; border: 1px solid var(--ap-border); border-left-width: 2px; background: var(--ap-surface); display: flex; flex-direction: column; max-height: calc(100vh - 17rem); min-height: 26rem; }
.plan__painel-cab { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--ap-border); }
.plan__abas { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--ap-border); }
.plan__aba { background: none; border: 0; padding: 7px 10px; font-size: 0.8125rem; color: var(--ap-subtle); border-bottom: 2px solid transparent; cursor: pointer; }
.plan__aba--ativa { color: var(--ap-heading); border-bottom-color: var(--ap-accent); font-weight: 600; }
.plan__painel-corpo { padding: 12px; overflow: auto; flex: 1; font-size: 0.8125rem; }
.plan__painel-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ap-border); }
.plan__grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plan__ro { padding: 6px 0; color: var(--ap-heading); }
.plan__folga { margin-top: 8px; padding: 8px; background: var(--ap-panel); border-radius: var(--radius-md); }
.plan__etapa { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.plan__add-pred { display: flex; gap: 6px; margin-top: 8px; }
.plan__colunas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.plan__vazio { padding: 24px; }
.plan__vazio-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; margin-top: 16px; }
.plan__vazio-cartao { border: 1px solid var(--ap-border); border-radius: var(--radius-lg); padding: 16px; background: var(--ap-surface); display: flex; flex-direction: column; gap: 6px; }
.plan__vazio-cartao h3 { margin: 0; font-size: 1rem; }
.plan__vazio-icone { font-size: 1.6rem; }
.plan__cal-nav { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px; }
.plan__cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ap-border); }
.plan__cal-cab { padding: 4px 6px; font-size: 0.75rem; background: var(--ap-panel); color: var(--ap-subtle); text-transform: capitalize; }
.plan__cal-dia { min-height: 5.5rem; border-top: 1px solid var(--ap-border); border-left: 1px solid var(--ap-border); padding: 2px 4px; overflow: hidden; }
.plan__cal-dia--fora { opacity: 0.45; }
.plan__cal-dia--folga { background: var(--ap-panel); }
.plan__cal-num { font-size: 0.7rem; color: var(--ap-subtle); }
.plan__cal-tarefa { display: block; width: 100%; text-align: left; border: 0; background: var(--ap-accent-soft); color: var(--ap-heading); font-size: 0.7rem; padding: 1px 4px; margin-top: 2px; border-radius: 3px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan__cal-tarefa--critica { border-left: 3px solid var(--dado-critico); }
.plan__cal-mais { font-size: 0.7rem; color: var(--ap-subtle); }

.gantt { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--ap-border); background: var(--ap-surface); font-size: 0.8125rem; min-width: 0; }
.gantt__cab { display: flex; height: 44px; flex: none; border-bottom: 1px solid var(--ap-border); background: var(--ap-panel); overflow: hidden; }
.gantt__cab-grade { display: flex; flex: none; overflow: hidden; white-space: nowrap; }
.gantt__cab-cel { flex: none; box-sizing: border-box; padding: 0 6px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ap-subtle); line-height: 44px; border-right: 1px solid var(--ap-border); overflow: hidden; text-overflow: ellipsis; }
.gantt__cab-divisor { width: 6px; flex: none; background: var(--ap-border); }
.gantt__cab-grafico { flex: 1; overflow: hidden; }
.gantt__svg-cab { display: block; }
.gantt__cab-alto { fill: var(--ap-panel); stroke: var(--ap-border); }
.gantt__cab-baixo { fill: var(--ap-surface); stroke: var(--ap-border); }
.gantt__cab-fds { fill: var(--ap-panel); }
.gantt__cab-texto { fill: var(--ap-subtle); font-size: 11px; }
.gantt__cab-centro { text-anchor: middle; }
.gantt__corpo { display: flex; flex: 1; min-height: 0; }
.gantt__grade { flex: none; overflow-x: auto; overflow-y: hidden; position: relative; outline: none; }
.gantt__grade:focus-visible { box-shadow: inset 0 0 0 2px var(--ap-focus); }
.gantt__grade-vao { position: relative; }
.gantt__linha { position: absolute; left: 0; display: flex; height: var(--linha-gantt); border-bottom: 1px solid var(--ap-border); line-height: calc(var(--linha-gantt) - 1px); cursor: default; user-select: none; white-space: nowrap; }
.gantt__linha--par { background: var(--ap-canvas); }
.gantt__linha--sel { background: var(--ap-accent-soft); }
.gantt__linha--resumo { font-weight: 600; }
.gantt__linha--critica .gantt__cel--wbs, .gantt__linha--critica .gantt__cel--dur { color: var(--dado-critico); font-weight: 600; }
.gantt__cel { flex: none; box-sizing: border-box; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--ap-border); color: var(--ap-body); height: var(--linha-gantt); line-height: calc(var(--linha-gantt) - 2px); }
.gantt__cel--ativa { box-shadow: inset 0 0 0 2px var(--ap-focus); }
.gantt__cel--edit { cursor: text; }
.gantt__cel--i { text-align: center; padding: 0 2px; letter-spacing: -1px; }
.gantt__ind-alerta { color: var(--dado-critico); font-weight: 700; }
.gantt__nome { display: flex; align-items: center; height: var(--linha-gantt); max-width: 100%; line-height: 1.2; }
.gantt__nome-txt { overflow: hidden; text-overflow: ellipsis; }
.gantt__nome-resumo { color: var(--ap-heading); }
.gantt__caret { width: 14px; flex: none; background: none; border: 0; padding: 0; color: var(--ap-subtle); cursor: pointer; font-size: 0.7rem; }
.gantt__caret--vazio { display: inline-block; cursor: default; height: 1px; }
.gantt__editor { width: 100%; height: calc(var(--linha-gantt) - 2px); box-sizing: border-box; font: inherit; border: 1px solid var(--ap-focus); background: var(--ap-surface); color: var(--ap-heading); padding: 0 4px; }
.gantt__divisor { width: 6px; flex: none; cursor: col-resize; background: var(--ap-border); }
.gantt__divisor:hover { background: var(--ap-accent); }
.gantt__grafico { flex: 1; min-width: 0; overflow: auto; position: relative; }
.gantt__grafico-vao { position: relative; }
.gantt__svg { display: block; }
.gantt__fds { fill: var(--ap-panel); opacity: .55; }
.gantt__grade-v { stroke: var(--ap-border); opacity: .55; }
.gantt__grade-h { stroke: var(--ap-border); }
.gantt__hoje { stroke: var(--ap-accent); stroke-width: 1.5; opacity: .85; }
.gantt__status { stroke: var(--dado-alerta); stroke-width: 1.5; stroke-dasharray: 5 3; }
.gantt__barra { fill: var(--ap-accent); cursor: grab; }
.gantt__barra--critica { fill: var(--dado-critico); }
.gantt__barra--quase { fill: var(--dado-quase-critico); }
.gantt__barra--manual { stroke: var(--ap-heading); stroke-width: 1; stroke-dasharray: 3 2; }
.gantt__progresso { fill: var(--ap-heading); opacity: .45; }
.gantt__hachura-fundo { fill: transparent; }
.gantt__hachura-linha { stroke: var(--ap-surface); stroke-width: 2; opacity: .75; }
.gantt__resumo { fill: var(--ap-heading); }
.gantt__resumo-prog { fill: var(--ap-accent); }
.gantt__marco { fill: var(--ap-heading); }
.gantt__marco.gantt__barra--critica { fill: var(--dado-critico); }
.gantt__lb { fill: var(--ap-muted); }
.gantt__alca { fill: transparent; cursor: ew-resize; }
.gantt__ponto { fill: var(--ap-surface); stroke: var(--ap-accent); stroke-width: 1.5; cursor: crosshair; opacity: 0; }
.gantt__barra-g:hover .gantt__ponto { opacity: 1; }
.gantt__vinculo { fill: none; stroke: var(--ap-subtle); stroke-width: 1.2; }
.gantt__vinculo--critico { stroke: var(--dado-critico); }
.gantt__seta { fill: var(--ap-subtle); }
.gantt__rotulo { fill: var(--ap-body); font-size: 11px; pointer-events: none; }
.gantt__exclama { fill: var(--ap-accent-fg); font-weight: 700; font-size: 11px; }
.gantt__elastico { stroke: var(--ap-accent); stroke-width: 1.5; stroke-dasharray: 4 3; pointer-events: none; }
@media (max-width: 1279px) { .plan__painel { position: fixed; right: 0; top: 2.75rem; bottom: 0; z-index: 60; max-height: none; } }

/* ==========================================================
   Planejamento — começar o plano (SPEC_Planner Sprint 4): assistente do orçamento, importação, modelos e menu Arquivo
   ========================================================== */
.plan__passos { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; }
.plan__passos li { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--ap-border); border-radius: 999px; color: var(--ap-muted); font-size: 0.8125rem; }
.plan__passos li span { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--ap-subtle); color: var(--ap-body); font-size: 0.75rem; }
.plan__passos li.is-ativo { border-color: var(--ap-accent); color: var(--ap-heading); font-weight: 600; }
.plan__passos li.is-ativo span { background: var(--ap-accent); color: var(--ap-accent-fg); }
.plan__passos li.is-feito span { background: var(--ap-accent-soft); color: var(--ap-accent-soft-fg); }
.plan__seq { display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow: auto; padding: 8px; border: 1px solid var(--ap-border); border-radius: var(--radius-md); }
.plan__previa h4 { margin: 8px 0; }
.plan__previa-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: 8px; margin-bottom: 8px; }
.plan__previa-numeros div { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 6px 10px; background: var(--ap-panel); display: flex; flex-direction: column; }
.plan__previa-numeros strong { font-size: 1.25rem; color: var(--ap-heading); }
.plan__previa-numeros span { font-size: 0.75rem; color: var(--ap-muted); }
.plan__modo { border: 1px solid var(--ap-border); border-radius: var(--radius-md); margin-top: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.plan__modelos { display: flex; flex-direction: column; gap: 8px; }
.plan__modelo { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 10px 12px; background: var(--ap-surface); cursor: pointer; }
.plan__modelo:has(input:checked) { border-color: var(--ap-accent); background: var(--ap-accent-soft); }
.plan__arquivo h4 { margin: 12px 0 6px; }
.plan__arquivo h4:first-child { margin-top: 0; }
.plan__arq-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.plan__arq-item .btn-outline { min-width: 13rem; text-align: left; }
.plan__arq-item select.input { width: auto; min-width: 9rem; }
.plan__modelo > label { display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; }
.plan__modelo-acoes { display: flex; gap: 6px; flex: none; }

/* ==========================================================
   Planejamento — aprovação, saúde, revisões, progresso e curva S (SPEC_Planner Sprint 5)
   ========================================================== */
.plan__saude { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan__saude-item { padding: 6px 10px; border: 1px solid var(--ap-border); border-radius: var(--radius-md); background: var(--ap-surface); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan__saude-item.is-alerta { border-color: var(--dado-alerta-forte); }
.plan__saude-item.is-bloqueio { border-color: var(--dado-erro-forte); background: var(--ap-panel); }
.plan__saude-item textarea { flex: 1 0 100%; }
.plan__saude-ok { color: var(--dado-sucesso-forte); font-weight: 700; }
.plan__saude-alerta { color: var(--dado-alerta-forte); }
.plan__saude-resumo { display: flex; gap: 8px; margin-bottom: 8px; }
.plan__apr-cab { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 10px; background: var(--ap-panel); }
.plan__etapas { margin: 6px 0 0; padding-left: 20px; }
.plan__pior { color: var(--dado-erro-forte); }
.plan__melhor { color: var(--dado-sucesso-forte); }
.plan__comparar { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan__comparar #cmpRes { flex: 1 0 100%; }
.plan__sugestoes { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.plan__ind-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 8px; margin-bottom: 8px; }
.plan__ind { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 8px 10px; background: var(--ap-panel); display: flex; flex-direction: column; gap: 2px; }
.plan__ind span { font-size: 0.75rem; color: var(--ap-muted); }
.plan__ind strong { font-size: 1.125rem; color: var(--ap-heading); }
.plan__ind small { font-weight: 400; color: var(--ap-muted); }
.plan__idx--verde strong { color: var(--dado-semaforo-verde); }
.plan__idx--amarelo strong { color: var(--dado-semaforo-amarelo); }
.plan__idx--vermelho strong { color: var(--dado-semaforo-vermelho); }
.plan__curva { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 8px; background: var(--ap-surface); overflow-x: auto; }
.plan__previa-numeros-item { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 6px 10px; background: var(--ap-panel); display: flex; flex-direction: column; }
.plan__previa-numeros-item strong { font-size: 1.25rem; color: var(--ap-heading); }
.plan__previa-numeros-item span { font-size: 0.75rem; color: var(--ap-muted); }

/* Planner (SPEC_Planner Sprint 7): kanban, ficha do card, minhas tarefas */
.kanban { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.kanban__col { flex: 0 0 17rem; background: var(--ap-panel); border: 1px solid var(--ap-border); border-radius: var(--radius-md); min-height: 8rem; }
.kanban__col.is-alvo { outline: 2px dashed var(--ap-accent); }
.kanban__cab { padding: 8px 10px; display: flex; justify-content: space-between; gap: 6px; font-size: 0.8125rem; }
.kanban__n { color: var(--ap-muted); }
.kanban__n.is-wip { color: var(--dado-erro-forte); font-weight: 700; }
.kanban__lista { display: flex; flex-direction: column; gap: 6px; padding: 6px; min-height: 3rem; }
.kanban__card { background: var(--ap-surface); border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 8px 10px; cursor: grab; touch-action: none; user-select: none; }
.kanban__card:hover, .kanban__card:focus-visible { border-color: var(--ap-accent); }
.kanban__card.is-arrastando { opacity: .35; }
.kanban__fantasma { position: fixed; z-index: 1000; pointer-events: none; opacity: .9; box-shadow: 0 6px 18px rgba(0,0,0,.25); background: var(--ap-surface); border: 1px solid var(--ap-accent); border-radius: var(--radius-md); padding: 8px 10px; }
.kanban__topo { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.kanban__titulo { font-size: 0.875rem; margin: 4px 0; color: var(--ap-heading); }
.planner__vencido { border-color: var(--dado-erro-forte) !important; }
.planner__origem { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.planner__corpo { border: 1px solid var(--ap-border); border-radius: var(--radius-md); padding: 8px 12px; margin: 8px 0; }
.planner__check { list-style: none; padding: 0; margin: 4px 0; }
.planner__coment { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 6px; }
.planner__coment li { border-left: 3px solid var(--ap-border); padding-left: 8px; }
.planner__coment li.is-auto { border-left-color: var(--ap-accent); color: var(--ap-muted); }
.planner__minhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 8px; }
.planner__linha { cursor: pointer; }
.plan__barra > .input, .plan__barra > select.input { width: auto; max-width: 14rem; }

/* SPEC_Planner Sprint 12 — Last Planner (T9), histograma de recursos, diagrama de rede */
#ganttRec, #ganttRede { height: 100%; overflow: auto; }
.lp-scroll { overflow: auto; max-width: 100%; padding: 0 12px 12px; }
.lp-kpi { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.lp-barras { display: grid; gap: 6px; margin-top: 8px; }
.lp-barra { display: grid; grid-template-columns: minmax(5rem, 9rem) 1fr minmax(6rem, auto); gap: 8px; align-items: center; font-size: 0.8125rem; }
.lp-barra__nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-barra__trilho { height: 0.75rem; background: var(--ap-panel); border-radius: 0.375rem; overflow: hidden; }
.lp-barra__valor { display: block; height: 100%; border-radius: 0.375rem; }
.lp-barra__num { text-align: right; white-space: nowrap; }
.lp-x { background: none; border: 0; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; padding: 0 0 0 0.25rem; }
