/*!
 * DrivoHub shell — única fonte de estilos para `/hub/index.html` e `/DrivoHub.html`.
 * Não copiar blocos `<style>` para o segundo ficheiro: editar só este CSS.
 *
 * Tema Drivo (paridade com app): filosofia **densidade com clareza**; cartões com
 * borda fina (0.5px) e raios `--radius-*`; tipografia Syne / DM Sans / DM Mono.
 * Cores marca: --brand-400 #1D9E75, --brand-600 #0F6E56, --warn #EF9F27, --danger #E24B4A.
 * Documentação de produto do tema: `docs/SPECS/DESIGN_SYSTEM.md` §0 (não há doc separado).
 * Paridade OKLCH no React: `client/src/index.css` → `[data-theme^="drivo"]`.
 */

/* ── TOKENS ── */
:root {
  --brand-50: #E1F5EE;
  --brand-100: #9FE1CB;
  --brand-400: #1D9E75;
  --brand-600: #0F6E56;
  --brand-900: #04342C;
  --warn: #EF9F27;
  --danger: #E24B4A;
  --info: #378ADD;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --sidebar-w: 200px;
  --topbar-h: 0px; /* topbar removido; chrome = barra Hub + sidebar (modo app) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --dur-fast: 100ms;
  --dur-base: 150ms;
  --dur-modal: 220ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Marca i3C: tipografia e raios distintos do padrão Drivo (:root). */
html[data-meli-brand="i3c"] {
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar-w: 216px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

[data-theme="dark"] {
  --bg-base: #0B0E14;
  --bg-surface: #111520;
  --bg-elevated: #181D2A;
  --bg-hover: #1E2438;
  --text-primary: #F0EFE9;
  --text-secondary: #8B8FA8;
  --text-tertiary: #4A4E62;
  --border-subtle: rgba(255,255,255,0.05);
  --border-default: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --glass: rgba(17,21,32,0.85);
  --toggle-active-bg: #f2f1ec;
  --toggle-active-fg: #0f1117;
}

[data-theme="light"] {
  --bg-base: #F5F4F0;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F0EEE8;
  --bg-hover: #E8E6E0;
  --text-primary: #0F1117;
  --text-secondary: #5A5E72;
  --text-tertiary: #9BA0B4;
  --border-subtle: rgba(0,0,0,0.06);
  --border-default: rgba(0,0,0,0.10);
  --border-strong: rgba(0,0,0,0.16);
  --glass: rgba(245,244,240,0.90);
  --toggle-active-bg: #ffffff;
  --toggle-active-fg: #0f1117;
}

/* ── Embed no SPA (sidebar do HTML oculto; chrome React fora do iframe) ── */
html.hub-embed nav.sidebar {
  display: none !important;
}
html.hub-embed .app-body {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}
html.hub-embed .app-body main.main,
html.hub-embed main.main {
  margin-left: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: min(100dvh, 100vh) !important;
  padding-top: 0 !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-base), color var(--dur-base);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* ── TOPBAR (removido do DOM no Hub; mantemos utilitários de logo para referência futura) ── */
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark img,
.logo-mark svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.logo-word {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.logo-lockup {
  height: 28px;
  width: auto;
  max-width: min(42vw, 140px);
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}
[data-theme="dark"] .logo-lockup-light { display: none !important; }
[data-theme="light"] .logo-lockup-dark { display: none !important; }
.status-pill {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-400);
  background: rgba(29,158,117,0.10);
  border: 0.5px solid rgba(29,158,117,0.25);
  padding: 3px 8px; border-radius: 20px;
}
.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-400);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── LAYOUT ── */
.app-body {
  display: flex;
  padding-top: 0;
  min-height: 100vh;
}

/* Modo Hub: só a barra HUB + conteúdo — sem sidebar duplicada */
html.hub-shell--hub nav.sidebar {
  display: none !important;
}
html.hub-shell--hub .main {
  margin-left: 0 !important;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  position: fixed; top: 0; bottom: 0; left: 0;
  background: var(--bg-surface);
  border-right: 0.5px solid var(--border-subtle);
  overflow: hidden;
  padding: 16px 0 24px;
  display: flex; flex-direction: column;
  z-index: 50;
}

.sidebar-scroll-panel--hub,
.sidebar-scroll-panel--app {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
html.hub-shell--hub .sidebar-scroll-panel--app {
  display: none !important;
}
html.hub-shell--app .sidebar-scroll-panel--hub {
  display: none !important;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 12px 16px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px;
  font-size: 13px; font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0;
  transition: all var(--dur-fast);
  border-left: 2px solid transparent;
  position: relative;
}
.nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-item.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-left-color: var(--brand-400);
}
.nav-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
a.nav-item { text-decoration: none; color: inherit; }
a.card-sm[data-drivohub-tab] { text-decoration: none; color: inherit; display: block; }

/* Hub nativo — Status / Matriz (sem iframe) */
#hub-status-root, #hub-matrix-root { min-height: 48vh; }
.hub-native-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 14px; padding: 10px 12px;
  background: var(--bg-elevated); border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
}
.hub-native-hint { font-size: 11px; color: var(--text-tertiary); line-height: 1.45; }
.hub-native-hint code { font-family: var(--font-mono); font-size: 10px; color: var(--brand-400); }
.hub-native-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(29,158,117,0.08); border: 0.5px solid rgba(29,158,117,0.25);
  color: var(--text-secondary);
}
.hub-native-chip-x {
  border: none; background: transparent; cursor: pointer; font-size: 14px; line-height: 1;
  color: var(--text-tertiary); padding: 0 2px;
}
.hub-native-mini {
  border: 0.5px solid var(--border-default); background: var(--bg-base);
  border-radius: 4px; font-size: 9px; padding: 2px 5px; cursor: pointer; color: var(--text-secondary);
}

/* Status — filtros, backlog, lista, ações IA */
.hub-native-toolbar-chips {
  margin-top: 0;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hub-exec-clear-btn--chips { margin-left: auto; }
.hub-exec-filter-group { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.hub-exec-filter-grow { flex: 1; min-width: 160px; }
.hub-exec-filter-group label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.hub-exec-filter-group select,
.hub-exec-filter-group input {
  font-family: var(--font-body); font-size: 12px; padding: 8px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-default);
  background: var(--bg-surface); color: var(--text-primary);
}
.hub-initiative-combo-group { min-width: 200px; flex: 1.25; }
/* Uma linha: badges + <select> nativo (mesma altura visual dos outros filtros). */
.hub-initiative-combo.hub-initiative-combo--inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.hub-initiative-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.hub-initiative-token {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.1);
  border: 1px solid rgba(29, 158, 117, 0.28);
  color: var(--text-secondary);
  max-width: 160px;
}
.hub-initiative-token-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.hub-initiative-token-x {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 2px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.hub-initiative-token-x:hover { color: var(--text-primary); }
.hub-initiative-add-select {
  flex: 0 0 auto;
  min-width: 132px;
  max-width: min(220px, 36vw);
}
.hub-exec-clear-btn {
  font-size: 11px; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: transparent; cursor: pointer;
  color: var(--text-secondary);
}
.hub-intelligence-panel {
  margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid rgba(55, 138, 221, 0.35); border-radius: var(--radius-md);
  background: rgba(55, 138, 221, 0.06);
}
.hub-intelligence-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.hub-intelligence-meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; }
.hub-intelligence-sub { font-size: 11px; font-weight: 600; margin-top: 10px; color: var(--text-secondary); }
.hub-intelligence-list { margin: 0; padding-left: 18px; font-size: 11px; color: var(--text-secondary); line-height: 1.5; }

/* Backlog: gatilho no cabeçalho Status + gaveta + cartões + modal de edição */
.hub-status-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
.hub-status-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hub-status-info-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: 600 12px/1 var(--font-body);
  cursor: help;
  padding: 0;
  line-height: 20px;
}
.hub-status-info-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.hub-status-initiative-host {
  display: flex;
  align-items: center;
  min-width: 0;
}
.hub-header-init-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hub-header-initiative-select {
  min-width: 140px;
  max-width: min(280px, 42vw);
  height: 36px;
  font-size: 12px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.hub-backlog-trigger-host { flex-shrink: 0; }
.hub-backlog-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.hub-backlog-open-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.hub-backlog-open-count {
  font-family: var(--font-mono);
  font-size: 10px;
  min-width: 1.25rem;
  text-align: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.12);
  color: var(--brand-600);
}

.hub-backlog-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 340;
  pointer-events: none;
}
.hub-backlog-drawer-root:not([hidden]) {
  pointer-events: auto;
}
.hub-backlog-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.42);
}
.hub-backlog-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100vw - 20px);
  height: 100%;
  max-height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  box-shadow: -14px 0 48px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
}
.hub-backlog-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.hub-backlog-drawer-head-text { min-width: 0; }
.hub-backlog-drawer-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display, var(--font-body));
}
.hub-backlog-drawer-sub {
  margin: 0;
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.45;
}
.hub-backlog-drawer-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}
.hub-backlog-drawer-close:hover { color: var(--text-primary); }
.hub-backlog-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hub-backlog-drawer-empty {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
}

.hub-backlog-card {
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border-default);
  background: var(--bg-elevated);
  padding: 14px 14px 10px;
}
.hub-backlog-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
}
.hub-backlog-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}
.hub-backlog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.hub-backlog-card-tag--mono {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
}
.hub-backlog-card-tag--quad {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(29, 158, 117, 0.45);
  color: var(--brand-600);
  background: var(--bg-surface);
}
.hub-backlog-card-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 0 6px;
}
.hub-backlog-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hub-backlog-card-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.hub-backlog-card-meta { font-size: 10px; max-width: 100%; line-height: 1.4; }
.hub-backlog-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.hub-backlog-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-body);
}
.hub-backlog-link-btn--danger { color: var(--danger); }

.hub-item-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(10, 12, 18, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hub-item-edit-overlay.open {
  display: flex;
}
.hub-item-edit-dialog {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}
.hub-item-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.hub-item-edit-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  font-family: var(--font-display, var(--font-body));
}
.hub-item-edit-x {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px;
}
.hub-item-edit-x:hover { color: var(--text-primary); }
.hub-item-edit-scroll {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.hub-item-edit-section { margin-bottom: 16px; }
.hub-item-edit-section:last-child { margin-bottom: 0; }
.hub-item-edit-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.hub-item-edit-input,
.hub-item-edit-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-sizing: border-box;
}
.hub-item-edit-textarea {
  resize: vertical;
  min-height: 88px;
}
.hub-item-edit-readonly {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
}
.hub-item-edit-readonly--sm {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}
.hub-item-edit-ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.hub-item-edit-li-muted {
  color: var(--text-tertiary);
  list-style: none;
  margin-left: -18px;
}
.hub-item-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.hub-item-edit-btn {
  font-size: 12px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-body);
}
.hub-item-edit-btn--ghost {
  border-color: transparent;
  color: var(--text-tertiary);
}
.hub-item-edit-btn--primary {
  border-color: rgba(29, 158, 117, 0.45);
  background: rgba(29, 158, 117, 0.12);
  color: var(--brand-600);
  font-weight: 600;
}

.hub-exec-list-wrap { overflow-x: auto; margin-bottom: 24px; }
.hub-exec-list-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hub-exec-list-table th {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-strong);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary);
}
.hub-exec-list-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.hub-list-title-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  text-align: left; font: inherit; color: var(--brand-400); text-decoration: underline;
  text-underline-offset: 2px;
}
.hub-list-actions { display: flex; flex-wrap: wrap; gap: 4px; }

.hub-card-actions-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.hub-card-act {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 36px; padding: 0; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-body);
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-default);
  box-shadow: none;
}
.hub-card-act svg { flex-shrink: 0; display: block; }
.hub-card-act.approve { border-color: rgba(29, 158, 117, 0.65); color: var(--brand-600); }
.hub-card-act.reject { border-color: rgba(226, 75, 74, 0.65); color: var(--danger); }
.hub-card-act.edit { border-color: rgba(55, 138, 221, 0.65); color: var(--info); }
.hub-card-act:hover { background: var(--bg-surface); border-color: var(--border-strong); }

.hub-reject-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 12, 18, 0.45); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.hub-reject-dialog {
  max-width: 420px; width: 100%; padding: 22px;
  background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.hub-reject-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.hub-reject-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.45; }
.hub-reject-fields { margin-bottom: 14px; }
.hub-reject-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  margin-top: 8px;
}
.hub-reject-label:first-child { margin-top: 0; }
.hub-reject-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-default);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.45;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 52px;
}
.hub-reject-textarea:focus {
  outline: none;
  border-color: rgba(29, 158, 117, 0.45);
  box-shadow: 0 0 0 2px rgba(29, 158, 117, 0.12);
}
.hub-reject-paths-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 8px;
}
.hub-reject-actions { display: flex; flex-direction: column; gap: 8px; }
.hub-reject-btn {
  font-size: 12px; padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border-default); background: var(--bg-elevated); color: var(--text-primary);
}
.hub-reject-btn.primary { border-color: rgba(226, 75, 74, 0.4); font-weight: 600; }
.hub-reject-btn--mechanical {
  border-color: rgba(55, 138, 221, 0.35);
  color: var(--info);
}
.hub-reject-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hub-reject-btn.ghost { border-color: transparent; color: var(--text-tertiary); }
.hub-reject-btn--approve {
  border-color: rgba(29, 158, 117, 0.45);
  color: var(--brand-400);
  font-weight: 600;
}
.hub-reject-btn--approve:hover {
  border-color: rgba(29, 158, 117, 0.65);
  background: rgba(29, 158, 117, 0.08);
}
.hub-intelligence-steps { list-style: decimal; padding-left: 1.25rem; }

.kanban-wrap-native {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 20px;
  align-items: start;
  overflow-x: auto;
  padding: 10px 8px 20px;
}
@media (max-width: 1100px) {
  .kanban-wrap-native { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
}
.matrix-item-btn {
  cursor: pointer;
  font: inherit;
}
.matrix-item-btn:hover {
  filter: none;
  box-shadow: none;
}
.col-inbox .kanban-col-dot { background: var(--text-tertiary); }

.kanban-wrap-native .kanban-col {
  gap: 12px;
  padding: 0 6px;
  min-width: 0;
}
.kanban-wrap-native .kanban-col-header {
  padding: 14px 16px 12px;
  min-height: 52px;
  align-items: center;
  margin-bottom: 6px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .kanban-wrap-native .kanban-col-header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.kanban-wrap-native .kanban-col-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  gap: 10px;
  line-height: 1.25;
}
.kanban-wrap-native .kanban-col-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}
.kanban-wrap-native .kanban-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.kanban-wrap-native .kanban-dropzone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 2px 10px;
}
.kanban-wrap-native .kanban-card {
  padding: 14px 16px;
}

.hub-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.hub-action-card {
  cursor: pointer;
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.hub-action-card:hover {
  border-color: rgba(29,158,117,0.35) !important;
  transform: translateY(-1px);
}
.hub-action-card strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-400);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

a.btn { text-decoration: none; }

.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
}
.nav-badge.soon { color: var(--warn); background: rgba(239,159,39,0.12); }
.nav-badge.new { color: var(--brand-400); background: rgba(29,158,117,0.12); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px 0;
  border-top: 0.5px solid var(--border-subtle);
}
.user-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.user-name { font-size: 12px; color: var(--text-secondary); }
.user-role { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); }

.admin-env-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-default);
}
.admin-env-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  color: var(--text-tertiary);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.admin-env-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.8;
}
.admin-env-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.admin-env-btn.active {
  background: var(--toggle-active-bg);
  color: var(--toggle-active-fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.admin-env-btn.active svg { opacity: 1; }

/* ── MAIN ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.hub-app-shell {
  display: none;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  flex-direction: column;
}
.hub-app-iframe {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border: 0;
  background: var(--bg-base);
}
html.hub-shell--app .hub-app-shell {
  display: flex !important;
}
html.hub-shell--hub .hub-app-shell {
  display: none !important;
}
html.hub-shell--app main.main > .page {
  display: none !important;
}
html.hub-embed .hub-app-shell {
  display: none !important;
}
html.hub-embed.hub-shell--app main.main > .page {
  display: block !important;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 200ms var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-header {
  padding: 28px 32px 0;
  margin-bottom: 24px;
}
.page-header--with-exec-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 20px;
}
.page-header--with-exec-actions .page-header-main {
  flex: 1;
  min-width: 0;
}
.hub-exec-view-host {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.hub-exec-col-details {
  position: relative;
}
.hub-exec-col-details > summary {
  list-style: none;
}
.hub-exec-col-details > summary::-webkit-details-marker {
  display: none;
}
.hub-exec-col-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 70;
  min-width: 200px;
  padding: 6px 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.hub-exec-col-menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
}
.hub-exec-col-menu-row:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.hub-exec-col-menu-row input {
  accent-color: rgb(29, 158, 117);
  cursor: pointer;
}
.hub-chips-row-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.hub-quad-badges-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.hub-quad-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.hub-quad-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.2;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast),
    opacity var(--dur-fast);
}
.hub-quad-badge:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.hub-quad-badge--default-on {
  border-color: rgba(29, 158, 117, 0.35);
  background: rgba(29, 158, 117, 0.1);
  color: var(--text-primary);
}
.hub-quad-badge--selected {
  border-color: rgba(55, 138, 221, 0.55);
  background: rgba(55, 138, 221, 0.12);
  color: var(--text-primary);
}
.hub-quad-badge--muted {
  opacity: 0.45;
}
.hub-exec-view-toggle-icon { display: flex; gap: 4px; align-items: center; }
.hub-exec-view-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
}
.hub-exec-view-icon-btn svg { display: block; }
.hub-exec-view-icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.hub-exec-view-icon-btn.active {
  border-color: rgba(55, 138, 221, 0.55);
  color: var(--info);
  background: rgba(55, 138, 221, 0.08);
}
.page-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}
.page-sub { font-size: 13px; color: var(--text-secondary); }

.page-content { padding: 0 32px 40px; }

/* ── GRID UTILS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ── CARD ── */
.card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.card-sm { padding: 16px 18px; border-radius: var(--radius-md); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-tertiary);
  display: flex; align-items: center; gap: 6px;
}
.card-title svg { width: 12px; height: 12px; }

/* ── KPI ── */
.kpi-value {
  font-family: var(--font-mono);
  font-size: 28px; font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 6px;
}
.kpi-label { font-size: 12px; color: var(--text-secondary); }
.kpi-trend {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px;
  margin-top: 8px;
}
.kpi-trend.up { color: var(--brand-400); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.neutral { color: var(--text-tertiary); }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}
.badge-green { background: rgba(29,158,117,0.12); color: var(--brand-400); border: 0.5px solid rgba(29,158,117,0.25); }
.badge-warn { background: rgba(239,159,39,0.12); color: var(--warn); border: 0.5px solid rgba(239,159,39,0.25); }
.badge-danger { background: rgba(226,75,74,0.12); color: var(--danger); border: 0.5px solid rgba(226,75,74,0.25); }
.badge-info { background: rgba(55,138,221,0.12); color: var(--info); border: 0.5px solid rgba(55,138,221,0.25); }
.badge-neutral { background: var(--bg-elevated); color: var(--text-tertiary); border: 0.5px solid var(--border-default); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 0.5px solid var(--border-default); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { border-bottom: 0.5px solid var(--border-default); }
th {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 10px 14px; text-align: left; white-space: nowrap;
  background: var(--bg-elevated);
}
td { padding: 12px 14px; color: var(--text-secondary); border-bottom: 0.5px solid var(--border-subtle); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }
td.mono { font-family: var(--font-mono); color: var(--text-primary); }
td.right { text-align: right; }

/* ── SECTION LABEL ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1; height: 0.5px;
  background: var(--border-subtle);
}

/* ── DIVIDER ── */
.divider { height: 0.5px; background: var(--border-subtle); margin: 24px 0; }

/* ══════════════════════════════════════
   PAGE: SYSTEM (Hub)
══════════════════════════════════════ */
.system-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }

.uptime-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border-left: 3px solid var(--brand-400);
}
.uptime-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.uptime-val { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--brand-400); }

.events-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.event-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border-subtle);
  font-size: 12px; color: var(--text-secondary);
}
.event-item:last-child { border-bottom: none; }
.event-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-400); flex-shrink: 0; margin-top: 5px; }
.event-dot.warn { background: var(--warn); }
.event-dot.info { background: var(--info); }

/* ══════════════════════════════════════
   PAGE: BRAND
══════════════════════════════════════ */
.brand-hero {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(29,158,117,0.05) 100%);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.brand-hero::before {
  content: 'drivo';
  position: absolute; right: -20px; top: -20px;
  font-family: var(--font-display);
  font-size: 120px; font-weight: 800;
  color: rgba(29,158,117,0.04);
  letter-spacing: -4px;
  user-select: none;
  pointer-events: none;
}
.brand-name-display {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 8px;
}
.brand-tagline-display {
  font-size: 15px; color: var(--text-secondary);
  margin-bottom: 20px;
}
.brand-domains { display: flex; gap: 8px; flex-wrap: wrap; }
.domain-chip {
  font-family: var(--font-mono); font-size: 12px;
  padding: 5px 12px; border-radius: 20px;
  border: 0.5px solid var(--border-strong);
  color: var(--text-secondary);
  background: var(--bg-elevated);
}
.domain-chip.primary { border-color: var(--brand-400); color: var(--brand-400); background: rgba(29,158,117,0.08); }

/* Brand page — peças main (guia compacto) */
.brand-piece-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: -4px 0 16px;
  max-width: 820px;
}
.brand-piece-row {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: baseline;
  font-size: 12px;
}
.brand-piece-n {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--brand-600);
  letter-spacing: 0.02em;
}
.brand-piece-t { font-weight: 600; color: var(--text-primary); }
.brand-piece-d { grid-column: 2; font-size: 11px; color: var(--text-tertiary); }

.brand-asset-kv {
  margin: 0;
  display: grid;
  gap: 6px 0;
  font-size: 11px;
}
.brand-asset-kv > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: start;
}
.brand-asset-kv dt {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.brand-asset-kv dd {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Download de vetores na página Marca — link textual (evita `<button class="tool-btn">` sem CSS = chrome UA). */
.hub-brand-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--brand-400);
  cursor: pointer;
  align-self: flex-start;
  text-align: left;
}
.hub-brand-dl-link:hover {
  color: var(--brand-600);
}
.hub-brand-dl-link:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: 2px;
}
.hub-brand-dl-link__text {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hub-brand-dl-link__icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: block;
}

.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) {
  .principles-grid { grid-template-columns: 1fr; }
}
.principle-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 14px 18px;
}
.principle-illu {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(29, 158, 117, 0.1);
  border: 1px solid rgba(29, 158, 117, 0.22);
  color: var(--brand-600);
}
.principle-illu svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.principle-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; line-height: 1.25; }
.principle-kv { margin: 0; }
.principle-kv > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px 10px;
  align-items: start;
  margin-bottom: 6px;
}
.principle-kv > div:last-child { margin-bottom: 0; }
.principle-kv dt {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.principle-kv dd {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tone-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
}
.tone-card-title { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.tone-card-title.yes { color: var(--brand-400); }
.tone-card-title.no { color: var(--danger); }
.tone-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.tone-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
}
.tone-pill.yes { background: rgba(29,158,117,0.10); color: var(--brand-400); border: 0.5px solid rgba(29,158,117,0.2); }
.tone-pill.no { background: rgba(226,75,74,0.10); color: var(--danger); border: 0.5px solid rgba(226,75,74,0.2); text-decoration: line-through; }

/* ══════════════════════════════════════
   PAGE: EXECUTION (Status / board)
══════════════════════════════════════ */
.kanban-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}

.kanban-col { display: flex; flex-direction: column; gap: 8px; }
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}
.kanban-col-title { font-size: 12px; font-weight: 500; color: var(--text-primary); display: flex; align-items: center; gap: 7px; }
.kanban-col-dot { width: 6px; height: 6px; border-radius: 50%; }
.col-now .kanban-col-dot { background: var(--brand-400); }
.col-next .kanban-col-dot { background: var(--info); }
.col-later .kanban-col-dot { background: var(--warn); }
.col-done .kanban-col-dot { background: var(--text-tertiary); }
.kanban-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }

.kanban-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
}
.kanban-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}
.kanban-card-title { font-size: 12px; font-weight: 500; color: var(--text-primary); margin-bottom: 5px; line-height: 1.4; }
.kanban-card-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.kanban-card-footer { display: flex; align-items: center; justify-content: flex-start; margin-top: 4px; }
.kanban-card-owner { font-size: 11px; color: var(--text-secondary); line-height: 1.35; }
.kanban-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.kanban-tag {
  font-family: var(--font-mono); font-size: 9px;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-default);
  box-shadow: none;
}

/* ══════════════════════════════════════
   PAGE: IMPACT × EFFORT (visual neutro, sem sombras)
══════════════════════════════════════ */
.matrix-wrap {
  background: #ffffff;
  border: 1px solid #d8dde4;
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
}
[data-theme="dark"] .matrix-wrap {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.matrix-axis-effort-top { margin-bottom: 10px; }
.matrix-body {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 2px;
}
.matrix-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 52px;
  min-height: 140px;
  padding: 10px 4px;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 6px 0 0 6px;
}
[data-theme="dark"] .matrix-y-axis {
  background: var(--bg-elevated);
  border-right-color: var(--border-default);
  color: var(--text-secondary);
}
.matrix-y-label .matrix-y-arrow { display: inline; font-weight: 700; }

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  min-height: 400px;
  margin: 16px 0;
  border: 1px solid #c5cad3;
  background: #c5cad3;
}
[data-theme="dark"] .matrix-grid {
  border-color: var(--border-strong);
  background: var(--border-strong);
}

.matrix-body > .matrix-grid {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.matrix-quad {
  padding: 18px 16px;
  position: relative;
  min-height: 190px;
  box-sizing: border-box;
  background: #ffffff;
  border: none;
}
[data-theme="dark"] .matrix-quad {
  background: var(--bg-base);
}
.matrix-quad:nth-child(1),
.matrix-quad:nth-child(3) {
  border-right: 1px solid #e9ecef;
}
[data-theme="dark"] .matrix-quad:nth-child(1),
[data-theme="dark"] .matrix-quad:nth-child(3) {
  border-right-color: var(--border-default);
}
.matrix-quad:nth-child(1),
.matrix-quad:nth-child(2) {
  border-bottom: 1px solid #e9ecef;
}
[data-theme="dark"] .matrix-quad:nth-child(1),
[data-theme="dark"] .matrix-quad:nth-child(2) {
  border-bottom-color: var(--border-default);
}

[data-theme="light"] .matrix-quad.q1 { background: #f7fcf9; }
[data-theme="light"] .matrix-quad.q2 { background: #f7f9fd; }
[data-theme="light"] .matrix-quad.q3 { background: #fdfcf7; }
[data-theme="light"] .matrix-quad.q4 { background: #fdf8f8; }

.matrix-quad-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.matrix-quad-icon {
  font-size: 1.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.matrix-quad-title-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #212529;
}
[data-theme="dark"] .matrix-quad-title-text {
  color: var(--text-primary);
}
.matrix-quad-sub {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 12px;
  line-height: 1.45;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
[data-theme="dark"] .matrix-quad-sub {
  color: var(--text-secondary);
}

.matrix-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 0 8px 8px 0;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.1s ease, border-color 0.1s ease;
}
[data-theme="light"] .matrix-item.matrix-item-btn {
  background: #ffffff;
  color: #343a40;
  border: 1px solid #ced4da;
}
[data-theme="light"] .matrix-item.matrix-item-btn:hover {
  background: #f1f3f5;
  border-color: #adb5bd;
  box-shadow: none;
  filter: none;
}

[data-theme="dark"] .matrix-item.matrix-item-btn {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
[data-theme="dark"] .matrix-item.matrix-item-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  box-shadow: none;
  filter: none;
}

.matrix-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #6c757d;
  letter-spacing: 0.05em;
  font-weight: 500;
}
[data-theme="dark"] .matrix-axis {
  color: var(--text-secondary);
}

/* ══════════════════════════════════════
   PAGE: DOCS
══════════════════════════════════════ */
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.docs-nav { display: flex; flex-direction: column; gap: 4px; }
.doc-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-md);
  font-size: 12px; color: var(--text-secondary);
  cursor: pointer; transition: all var(--dur-fast);
  border: 0.5px solid transparent;
}
.doc-nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.doc-nav-item.active { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-default); }
.doc-nav-item svg { width: 12px; height: 12px; color: var(--text-tertiary); }

.doc-content {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  font-size: 13px; line-height: 1.75; color: var(--text-secondary);
  min-height: 400px;
}
.doc-content h1 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.doc-content h2 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 20px 0 8px; border-bottom: 0.5px solid var(--border-subtle); padding-bottom: 6px; }
.doc-content h3 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 14px 0 6px; }
.doc-content p { margin-bottom: 10px; }
.doc-content ul { margin: 8px 0 8px 16px; }
.doc-content li { margin-bottom: 4px; }
.doc-content code { font-family: var(--font-mono); font-size: 11px; background: var(--bg-elevated); padding: 1px 5px; border-radius: 3px; color: var(--brand-400); }
.doc-content strong { color: var(--text-primary); font-weight: 500; }
.doc-content blockquote { border-left: 2px solid var(--brand-400); padding: 8px 14px; background: rgba(29,158,117,0.05); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 12px 0; font-style: normal; }
.doc-content .doc-source-ref {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.doc-content .hub-obsidian-graph-wrap {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
}
.doc-content .hub-obsidian-waiting {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.doc-content .hub-obsidian-graph-svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════
   PAGE: ASSETS
══════════════════════════════════════ */
.assets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.asset-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.asset-preview {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 0.5px solid var(--border-subtle);
}
.asset-info { padding: 12px 14px; }
.asset-name { font-size: 12px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.asset-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); }

.color-swatch {
  width: 100%; height: 100%;
  display: flex; align-items: flex-end;
  padding: 10px;
}
.swatch-hex { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.7); }

/* ══════════════════════════════════════
   PAGE: TOOLS (Copy Generator)
══════════════════════════════════════ */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tool-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.tool-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.tool-desc { font-size: 11px; color: var(--text-tertiary); margin-bottom: 14px; }

.tool-input, .tool-textarea, .tool-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body); font-size: 12px;
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--dur-fast);
  resize: none;
}
.tool-input:focus, .tool-textarea:focus { border-color: var(--brand-400); }
.tool-textarea { min-height: 80px; }
.tool-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 5px; margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  cursor: pointer; border: none; transition: all var(--dur-fast);
}
.btn-primary { background: var(--brand-400); color: white; }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-secondary); border: 0.5px solid var(--border-default); }
.btn-secondary:hover { color: var(--text-primary); background: var(--bg-hover); }

.output-box {
  margin-top: 12px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px; line-height: 1.7;
  color: var(--text-secondary);
  min-height: 80px;
  display: none;
}
.output-box.visible { display: block; }

/* ══════════════════════════════════════
   PAGE: PERSONAS
══════════════════════════════════════ */
.personas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.persona-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.persona-spotlight {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 14px 16px 14px 0;
  background: linear-gradient(90deg, rgba(15, 110, 86, 0.12) 0%, transparent 72%);
  border-bottom: 0.5px solid var(--border-subtle);
}
.persona-spotlight-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 0 3px 3px 0;
  margin-right: 12px;
  background: var(--brand-600);
}
.persona-spotlight-quote {
  margin: 0;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.55;
  color: var(--brand-600);
}
[data-theme="light"] .persona-spotlight-quote { color: #0a5a47; }
.persona-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 0;
}
.persona-card-head-text { min-width: 0; flex: 1; }
.persona-body { padding: 8px 20px 20px; }
.persona-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.persona-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.persona-name--hero {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 4px;
}
.persona-role { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.05em; margin-bottom: 0; }
.persona-section-title { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin: 14px 0 8px; }
.persona-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.persona-list--spaced { gap: 10px; }
.persona-list li { font-size: 11px; color: var(--text-secondary); padding-left: 0; position: relative; line-height: 1.5; }
.persona-list--spaced li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-subtle);
}
.persona-list--spaced li::before { display: none; }
.persona-li-n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(29, 158, 117, 0.2);
  border-radius: var(--radius-sm);
}
.persona-quote {
  margin-top: 12px; font-size: 11px; font-style: normal;
  color: var(--brand-400); padding-left: 10px;
  border-left: 2px solid var(--brand-400);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   PAGE: COMPETITORS
══════════════════════════════════════ */
.comp-table-wrap { background: var(--bg-surface); border: 0.5px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.comp-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.comp-table-wrap th,
.comp-table-wrap td { padding: 10px 12px; text-align: left; border-bottom: 0.5px solid var(--border-subtle); vertical-align: middle; }
.comp-table-wrap th { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); background: var(--bg-elevated); }
.comp-table-wrap tr:last-child td { border-bottom: none; }
.comp-profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.comp-profile-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0.5px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.comp-profile-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(29, 158, 117, 0.35);
}
.comp-player-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--brand-400);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(29, 158, 117, 0.35);
  text-underline-offset: 3px;
}
.comp-player-link:hover { color: var(--brand-600); }
.comp-profile-back { margin-bottom: 8px; }
.comp-profile-lead {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 820px;
  margin: 0 0 16px;
}
.comp-profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.comp-profile-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.comp-profile-fact-body { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-secondary); }
.comp-profile-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.comp-profile-list li { margin-bottom: 6px; }
.comp-profile-list li:last-child { margin-bottom: 0; }
.comp-profile-dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.comp-profile-dl div { margin: 0; }
.comp-profile-dl dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.comp-profile-dl dd { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-secondary); }
.comp-profile-source {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 0.5px solid var(--border-subtle);
}

.positioning-map {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.map-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-default); border-radius: var(--radius-md);
  overflow: hidden; margin: 12px 0; height: 280px;
}
.map-quad { background: var(--bg-base); padding: 14px; position: relative; }
.map-quad-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
.map-chip {
  display: inline-block; font-size: 10px; font-weight: 500;
  padding: 3px 8px; border-radius: 3px; margin: 2px;
}
.map-chip.drivo { background: var(--brand-400); color: white; font-weight: 700; }
.map-chip.comp { background: var(--bg-elevated); color: var(--text-secondary); border: 0.5px solid var(--border-strong); }

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 150ms var(--ease); }
.modal {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 520px; max-width: 90vw;
  max-height: 80vh; overflow-y: auto;
  animation: slideUp 200ms var(--ease);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 2px; font-size: 18px; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }
.modal-section { margin-bottom: 14px; }
.modal-section-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; }
.modal-body { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
#modal-context { white-space: pre-wrap; }

/* ── FOOTER ── */
.page-footer {
  padding: 16px 32px;
  border-top: 0.5px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary);
  display: flex; justify-content: space-between;
  letter-spacing: 0.04em;
}

/* ══ Hub: primary nav (HUB + Projeto / Marketing / Marca) ══ */
.hub-primary-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 0 32px;
  background: var(--bg-base);
  border-bottom: none;
}
html.hub-embed .hub-primary-nav {
  top: 0;
  padding: 0 16px;
  background: var(--glass);
  backdrop-filter: blur(10px);
}
.hub-primary-nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 8px 0;
}
.hub-primary-nav-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.hub-nav-pill {
  border: 0.5px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  transition: background var(--dur-fast), color var(--dur-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hub-nav-pill-badge {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  border-radius: 5px;
}
.hub-nav-pill:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.hub-nav-pill.is-active {
  background: rgba(29,158,117,0.14);
  color: var(--brand-600);
  border: 0.5px solid rgba(29,158,117,0.35);
}
[data-theme="dark"] .hub-nav-pill.is-active {
  color: var(--brand-400);
}

details.hub-nav-dd { position: relative; }
.hub-nav-dd summary { list-style: none; }
.hub-nav-dd summary::-webkit-details-marker { display: none; }
.hub-nav-dd-summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px 7px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.hub-nav-dd-summary::after {
  content: "";
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-tertiary);
  opacity: 0.85;
  transition: transform var(--dur-fast);
}
.hub-nav-dd[open] .hub-nav-dd-summary::after {
  transform: rotate(180deg);
}
.hub-nav-dd-summary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.hub-nav-dd-summary.is-active {
  color: var(--text-primary);
  font-weight: 600;
}
.hub-nav-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 188px;
  padding: 6px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  z-index: 60;
}
[data-theme="dark"] .hub-nav-dd-menu {
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
}
.hub-nav-dd-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
}
.hub-nav-dd-menu button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Hub landing (HUB page) */
.hub-landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.hub-pillar-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.hub-pillar-card:hover {
  border-color: rgba(29,158,117,0.35);
  box-shadow: 0 4px 20px rgba(29,158,117,0.06);
}
.hub-pillar-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.hub-pillar-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  line-height: 1.15;
}
.hub-pillar-lead {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: -4px;
}
.hub-pillar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-pillar-links button {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-600);
  background: rgba(29,158,117,0.08);
  border: 0.5px solid rgba(29,158,117,0.22);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--dur-fast);
}
[data-theme="dark"] .hub-pillar-links button {
  color: var(--brand-400);
}
.hub-pillar-links button:hover {
  background: rgba(29,158,117,0.14);
}
.hub-pillar-card--projeto { border-left: 3px solid var(--info); }
.hub-pillar-card--marketing { border-left: 3px solid var(--warn); }
.hub-pillar-card--marca { border-left: 3px solid var(--brand-400); }

.hub-preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.hub-preview-row--intel {
  gap: 22px;
  margin-bottom: 28px;
}
.hub-preview-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-preview-card--intel {
  padding: 22px 24px 20px;
  gap: 14px;
  border-color: var(--border-strong);
}
.hub-preview-card-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}
.hub-preview-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.hub-preview-card--intel .hub-preview-card-title {
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hub-preview-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}
.hub-preview-card--intel .hub-preview-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hub-kpi-mount {
  min-height: 120px;
  flex: 1;
}
.hub-kpi-loading {
  margin: 0;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 16px 4px;
}
.hub-kpi-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) {
  .hub-kpi-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .hub-kpi-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hub-kpi-stat:nth-child(5) {
    grid-column: 1 / -1;
  }
}
.hub-kpi-stat {
  background: var(--bg-base);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 8px 10px;
  text-align: center;
}
.hub-kpi-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  line-height: 1.25;
}
.hub-kpi-stat-val {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 6px;
}
.hub-kpi-stat-pct {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.3;
}
.hub-kpi-caption {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.hub-kpi-caption--mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

.hub-kpi-matrix-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 0.5px solid var(--border-default);
}
.hub-kpi-matrix-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.hub-kpi-matrix-sweet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}
.hub-kpi-matrix-sweet {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand-400);
  line-height: 1;
}
.hub-kpi-matrix-sweet-label {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.hub-kpi-matrix-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.hub-kpi-matrix-quads {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-kpi-quadrant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 0.5px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-primary);
}
.hub-kpi-quadrant-n {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.hub-kpi-prio-block {
  margin-top: 12px;
}
.hub-kpi-prio-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-subtle);
}
.hub-kpi-prio-seg {
  display: block;
  min-width: 0;
  height: 100%;
  transition: width var(--dur-base) var(--ease);
}
.hub-kpi-prio-seg--high {
  background: var(--brand-400);
}
.hub-kpi-prio-seg--med {
  background: var(--info);
}
.hub-kpi-prio-seg--low {
  background: var(--text-tertiary);
  opacity: 0.65;
}
.hub-kpi-prio-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}
.hub-kpi-prio-legend strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.hub-kpi-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hub-kpi-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 0.5px solid var(--border-default);
  color: var(--text-primary);
}
.hub-kpi-tag-n {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-600);
}
[data-theme="dark"] .hub-kpi-tag-n {
  color: var(--brand-400);
}
.hub-kpi-tag--muted {
  color: var(--text-tertiary);
  font-weight: 400;
}

.hub-philosophy-lead {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 14px;
  max-width: 900px;
}
.hub-philosophy-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
details.hub-philosophy-item {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}
details.hub-philosophy-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
details.hub-philosophy-item summary::-webkit-details-marker { display: none; }
.hub-phi-summary-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.hub-phi-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-400);
  background: rgba(29,158,117,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}
.hub-phi-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform var(--dur-fast);
}
details.hub-philosophy-item[open] .hub-phi-chevron {
  transform: rotate(180deg);
}
.hub-philosophy-body {
  padding: 0 16px 16px;
  border-top: 0.5px solid var(--border-subtle);
}
.hub-philosophy-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}
.hub-phi-chart {
  margin: 0;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-subtle);
}
.hub-phi-chart svg {
  display: block;
  width: 100%;
  max-height: 128px;
}

.hub-faca-lead {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: -4px 0 14px;
  max-width: 920px;
}
.hub-faca-agora-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}
.hub-faca-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 20px 22px;
  min-height: 96px;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  border-left: 3px solid rgba(29, 158, 117, 0.45);
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    box-shadow var(--dur-fast);
}
.hub-faca-card:hover {
  border-color: rgba(29, 158, 117, 0.38);
  background: var(--bg-elevated);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .hub-faca-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}
.hub-faca-card:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .kanban-wrap { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .personas-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hub-landing-grid { grid-template-columns: 1fr; }
  .hub-preview-row { grid-template-columns: 1fr; }
  .hub-faca-agora-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hub-faca-agora-grid { grid-template-columns: 1fr; }
  .hub-primary-nav { padding: 0 16px; }
}
