  * { box-sizing: border-box; }
  html, body, #app {
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }
  #app {
    position: fixed;
    inset: 0;
    overflow: auto;
  }
  body { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  button, input, select, textarea { font: inherit; }
  .scroll-thin { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
  .scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
  .scroll-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
  .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
  .desktop-nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  @media (max-width: 900px) { .app-shell { grid-template-columns: 1fr; } .desktop-nav { display: none; } }
  .field { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; background: white; outline: none; }
  .field:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
  .icon-btn { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd5e1; background: white; color: #475569; }
  .icon-btn:hover { background: #f8fafc; color: #0f172a; }
  .is-processing { opacity: .78; cursor: progress !important; pointer-events: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .busy-spinner { width: 14px; height: 14px; border-radius: 999px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: busy-spin .75s linear infinite; display: inline-block; flex: 0 0 auto; }
  .busy-spinner-dark { border-color: rgba(79,70,229,.22); border-top-color: #4f46e5; }
  @keyframes busy-spin { to { transform: rotate(360deg); } }
  .kn-saving { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: #4338ca; background: #eef2ff; border: 0.5px solid #c7d2fe; border-radius: 999px; padding: 2px 7px; z-index: 3; }
  .kn-saving .busy-spinner { width: 10px; height: 10px; border-width: 2px; }

  /* ── Reordenar subtarefas por arrastar (FDB-0019) ──────── */
  .st-grip { cursor: grab; color: #94a3b8; padding: 2px 4px; border-radius: 6px; touch-action: none; flex: 0 0 auto; align-self: center; }
  .st-grip:hover { color: #475569; background: #f1f5f9; }
  .st-grip:active { cursor: grabbing; }
  .st-node.st-dragging > .st-row { opacity: .45; }
  .st-row.st-over-top { box-shadow: 0 -3px 0 -1px #4f46e5; }
  .st-row.st-over-bottom { box-shadow: 0 3px 0 -1px #4f46e5; }
  .st-row.st-saved { animation: st-flash-green .9s ease-out; }
  /* Cascata recursiva de subtarefas no detalhe (sub-subtarefas) */
  .st-children { padding-left: 16px; margin-top: 8px; margin-left: 11px; border-left: 2px solid #e2e8f0; }
  .st-children.st-collapsed { display: none; }
  .st-node + .st-node { margin-top: 8px; }
  .st-children > .st-node:first-child { margin-top: 0; }
  .st-caret-btn { flex: 0 0 auto; color: #64748b; }
  .st-caret-spacer { flex: 0 0 auto; width: 24px; }
  @keyframes st-flash-green {
    0% { background: #dcfce7; box-shadow: 0 0 0 2px #22c55e; }
    100% { background: inherit; box-shadow: none; }
  }

  /* ── Tela de criação V2 (FDB-0012) ─────────────────────── */
  .v2pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #eef2f6; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; color: #64748b; background: #f8fafc; }
  .v2pill select, .v2pill input { border: none; outline: none; font-size: 12px; font-weight: 600; color: #1e293b; background: transparent; }
  .v2section { border: 1px solid #eef2f6; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(2,6,23,.03); }
  .v2ghost { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #cbd5e1; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #64748b; background: #fff; cursor: pointer; }
  .v2ghost:hover { border-color: #a5b4fc; color: #4f46e5; }
  .v2chip { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: #4338ca; border: 1px solid #e0e7ff; border-radius: 999px; padding: 2px 6px 2px 4px; font-size: 11px; font-weight: 600; }
  .v2chip.resp { background: #eef2ff; border-color: #c7d2fe; }
  .v2chip .av { width: 18px; height: 18px; border-radius: 999px; background: #eef2ff; color: #4338ca; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; }
  .v2chip.resp .av { background: #4f46e5; color: #fff; }
  .v2chip button { border: none; background: transparent; color: #a5b4fc; cursor: pointer; padding: 0 2px; }
  .v2row { border: 1px solid #eef2f6; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(2,6,23,.03); }
  .v2row.dragging { opacity: .4; }
  .v2row.over-top { box-shadow: 0 -3px 0 -1px #818cf8; }
  .v2row.over-bottom { box-shadow: 0 3px 0 -1px #818cf8; }
  .v2grip { cursor: grab; color: #cbd5e1; }
  .v2grip:hover { color: #94a3b8; }
  .v2pop { position: absolute; z-index: 50; top: 30px; left: 0; width: 230px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 14px 40px rgba(2,6,23,.14); padding: 8px; }
  .v2pop label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #334155; cursor: pointer; }
  .v2pop label:hover { background: #f8fafc; }
  .v2conn { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; cursor: crosshair; border: 1px solid; }
  .v2conn.in { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
  .v2conn.out { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
  .v2deptag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 700; }
  .v2deptag.need { background: #ecfdf5; color: #0f766e; }
  .v2deptag.rel { background: #eef2ff; color: #4338ca; }
  .v2linkcard { width: 150px; border: 1px solid #eef2f6; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(2,6,23,.03); padding: 10px; }
  .v2linkadd { width: 150px; border: 1.5px dashed #cbd5e1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #64748b; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 96px; }
  .v2linkadd:hover { border-color: #a5b4fc; color: #4f46e5; }
  .v2link-confirm { margin-top: 2px; display: flex; align-items: center; justify-content: center; padding: 6px 8px; border-radius: 8px; background: #4f46e5; color: #fff; font-size: 11px; font-weight: 700; border: none; cursor: pointer; }
  .v2link-confirm:hover { background: #4338ca; }
  .v2linkcard-done { border-color: #c7d2fe; background: #fbfbff; }

  /* Pre-visualizacao do card no hover do Kanban */
  .kanban-preview { position: fixed; z-index: 90; width: 300px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 18px 50px rgba(2,6,23,.22); padding: 14px; font-size: 12px; pointer-events: none; animation: kanban-preview-in .12s ease-out; }
  @keyframes kanban-preview-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
  .kanban-preview .kp-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 0.5px solid #f1f5f9; }
  .kanban-preview .kp-row:last-child { border-bottom: none; }
  .kanban-preview .kp-k { color: #94a3b8; font-weight: 700; }
  .kanban-preview .kp-v { color: #334155; font-weight: 600; text-align: right; }

  /* Aviso de dependencia impossivel no Gantt (FDB-0003) */
  .gantt-reject { animation: gantt-reject .45s ease; box-shadow: 0 0 0 2px #ef4444 !important; }
  @keyframes gantt-reject { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
  .gantt-bar-mov { cursor: default; }
  .gantt-bar-mov.gantt-bar-active { cursor: ew-resize; box-shadow: 0 0 0 2px #6366f1, 0 4px 10px rgba(2,6,23,.25) !important; z-index: 30; }
  .gantt-grip { position: absolute; top: 0; bottom: 0; width: 14px; z-index: 18; opacity: 0; pointer-events: auto; cursor: ew-resize; }
  .gantt-grip::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 3px; height: 14px; border-radius: 2px; background: rgba(255,255,255,.85); }
  .gantt-grip-l { left: 0; } .gantt-grip-l::before { left: 2px; }
  .gantt-grip-r { right: 0; } .gantt-grip-r::before { right: 2px; }
  .gantt-bar-mov:hover .gantt-grip { opacity: 1; }
  .gantt-drag-label { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); white-space: nowrap; background: #1e293b; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; pointer-events: none; z-index: 40; box-shadow: 0 2px 6px rgba(2,6,23,.3); }
  body.gantt-dragging { cursor: ew-resize; user-select: none; }
  .g-tick { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; padding-left: 2px; overflow: visible; }
  .g-tick b { font-size: 11px; font-weight: 800; color: #475569; }
  .g-tick i { font-size: 8px; font-weight: 700; text-transform: uppercase; color: #94a3b8; font-style: normal; letter-spacing: .02em; }
  .g-tick.g-today b, .g-tick.g-today i { color: #dc2626; }
  .gantt-ghost { position: absolute; top: 4px; height: 28px; border: 1.5px dashed #94a3b8; border-radius: 6px; background: rgba(148,163,184,.12); z-index: 5; pointer-events: none; }
  .gantt-bar-saving { animation: gantt-save-pulse 1s ease-in-out infinite; box-shadow: 0 0 0 2px #6366f1 !important; }
  @keyframes gantt-save-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

  /* ── Detail Panel Pills (dp-*) ─────────────────────────── */
  .dp-body { padding: 10px 12px; }
  .dp-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 6px 0; border-bottom: 0.5px solid #e2e8f0; }
  .dp-row:last-child { border-bottom: none; }
  .dp-ia-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; background: rgba(129,140,248,.18); color: #c7d2fe; border: 0.5px solid rgba(129,140,248,.35); }
  .dp-pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; cursor: pointer; border: 0.5px solid; white-space: nowrap; position: relative; }
  .dp-pill-gray   { background: #F1EFE8; color: #5F5E5A; border-color: #D3D1C7; }
  .dp-pill-amber  { background: #FAEEDA; color: #854F0B; border-color: #FAC775; }
  .dp-pill-indigo { background: #EEEDFE; color: #534AB7; border-color: #CECBF6; }
  .dp-pill-red    { background: #FCEBEB; color: #A32D2D; border-color: #F7C1C1; }
  .dp-pill-teal   { background: #E1F5EE; color: #0F6E56; border-color: #9FE1CB; }
  .dp-pill-muted  { background: #f8fafc; color: #64748b; border-color: #e2e8f0; font-weight: 400; }
  .dp-pill-violet { background: #F3EFFE; color: #6D28D9; border-color: #C4B5FD; }
  .dp-pill-person { background: #f8fafc; color: #1e293b; border-color: #e2e8f0; }
  .dp-pill-prog   { gap: 5px; cursor: default; }
  .dp-pill-auto   { cursor: default; opacity: .85; }
  .dp-icon { font-size: 11px; opacity: .75; }
  .dp-caret { font-size: 9px; opacity: .5; }
  .dp-caret-open { transform: rotate(90deg); }
  .dp-sel { appearance: none; -webkit-appearance: none; background: transparent; border: none; outline: none; cursor: pointer; padding: 0; font: inherit; font-size: 11px; font-weight: 500; color: inherit; max-width: 90px; }
  .dp-av { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 600; flex-shrink: 0; color: #fff; }
  .dp-av-sm { width: 18px; height: 18px; font-size: 7px; }
  .dp-av-stacked { border: 1.5px solid white; margin-right: -5px; }
  .dp-av-stacked:last-child { margin-right: 0; }
  .dp-av-stack { display: inline-flex; align-items: center; }
  .dp-av-i { background: #4f46e5; }
  .dp-av-t { background: #0F6E56; }
  .dp-av-a { background: #854F0B; }
  .dp-av-p { background: #993556; }
  .dp-av-gray { background: #888780; font-size: 9px; }
  .dp-prefix { font-size: 10px; opacity: .6; margin-right: 1px; }
  .dp-date { appearance: none; -webkit-appearance: none; background: transparent; border: none; outline: none; cursor: pointer; padding: 0; font: inherit; font-size: 11px; color: inherit; width: 90px; }
  .dp-prog-bar { width: 40px; height: 4px; background: #e2e8f0; border-radius: 2px; flex-shrink: 0; }
  .dp-prog-fill { height: 4px; border-radius: 2px; }
  .dp-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 500; background: #E6F1FB; color: #185FA5; border: 0.5px solid #B5D4F4; }
  .dp-collab-panel { padding: 6px 10px 8px; border-bottom: 0.5px solid #e2e8f0; background: #f8fafc; }
  .dp-collab-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
  .dp-collab-del { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 11px; padding: 2px; }
  .dp-collab-add { display: flex; gap: 5px; margin-top: 6px; padding-top: 6px; border-top: 0.5px solid #e2e8f0; }
  .dp-docs-section { border: 0.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-top: 8px; }
  .dp-docs-hdr { display: flex; align-items: center; gap: 7px; padding: 7px 10px; background: #f8fafc; border-bottom: 0.5px solid #e2e8f0; cursor: pointer; }
  .dp-docs-label { font-size: 11px; font-weight: 500; color: #64748b; flex: 1; }
  .dp-cascade-level { border-bottom: 0.5px solid #e2e8f0; }
  .dp-cascade-level:last-child { border-bottom: none; }
  .dp-cascade-hdr { display: flex; align-items: center; gap: 7px; padding: 6px 10px; cursor: pointer; }
  .dp-cascade-name { font-size: 11px; color: #1e293b; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dp-count { font-size: 9px; border-radius: 8px; padding: 1px 7px; border: 0.5px solid; white-space: nowrap; flex-shrink: 0; }
  .dp-count-has  { color: #185FA5; border-color: #B5D4F4; background: #E6F1FB; }
  .dp-count-zero { color: #94a3b8; border-color: #e2e8f0; background: #f8fafc; }
  .dp-file-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 10px 10px; }
  .dp-file-wrap { display: flex; flex-direction: column; width: 108px; flex-shrink: 0; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(2,6,23,.05); }
  .dp-file-wrap:hover { border-color: #a5b4fc; }
  .dp-file-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 9px; border: none; background: none; cursor: pointer; text-decoration: none; }
  .dp-file-icon { font-size: 32px; line-height: 1; }
  .dp-file-name { font-size: 11px; color: #475569; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
  .dp-file-bar { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px; border-top: 1px solid #f1f5f9; background: #f8fafc; }
  .dp-file-act { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #64748b; font-size: 14px; cursor: pointer; padding: 0; }
  .dp-file-act:hover { border-color: #a5b4fc; color: #4f46e5; }
  .dp-file-act-info { color: #4f46e5; border-color: #c7d2fe; background: #eef2ff; }
  .dp-file-act-info:hover { background: #4f46e5; color: #fff; }
  .dp-file-act-del:hover { border-color: #fca5a5; color: #e11d48; }
  .dp-file-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 108px; min-height: 92px; border: 1.5px dashed #cbd5e1; border-radius: 12px; background: none; cursor: pointer; color: #94a3b8; font-size: 11px; font-weight: 700; }
  .dp-file-add:hover { border-color: #4f46e5; color: #4f46e5; }
  .dp-add-form { padding: 6px 10px 8px; background: #f8fafc; border-top: 0.5px solid #e2e8f0; display: flex; flex-direction: column; gap: 4px; }
  .dp-docs-body { max-height: 44vh; overflow-y: auto; }
  .att-obs-pop { position: fixed; z-index: 120; max-width: 280px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgba(2,6,23,.20); padding: 11px 13px; font-size: 12px; color: #334155; pointer-events: none; }
  .att-obs-pop-title { font-weight: 800; color: #1e293b; margin-bottom: 5px; font-size: 13px; }
  .att-obs-pop-obs { white-space: pre-wrap; line-height: 1.45; }
  .att-obs-pop-empty { color: #94a3b8; font-style: italic; }
  .att-obs-pop-meta { margin-top: 8px; padding-top: 7px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: #94a3b8; }
  /* Painel lateral da tela de Atribuicao (FDB-0008) */
  .assign-panel { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 16px; box-shadow: 0 1px 3px rgba(2,6,23,.06); }
  .ap-empty { color: #94a3b8; text-align: center; padding: 44px 12px; font-size: 13px; }
  .ap-empty i { font-size: 26px; display: block; margin-bottom: 10px; color: #cbd5e1; }
  .ap-head { display: flex; align-items: center; gap: 8px; }
  .ap-tipo { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #4f46e5; background: #eef2ff; border-radius: 999px; padding: 2px 9px; }
  .ap-id { font-family: monospace; font-size: 11px; font-weight: 700; color: #94a3b8; }
  .ap-title { margin-top: 8px; font-size: 15px; font-weight: 800; color: #1e293b; line-height: 1.3; }
  .ap-crumb { margin-top: 3px; font-size: 11px; color: #94a3b8; }
  .ap-desc { margin-top: 10px; font-size: 12px; line-height: 1.5; color: #475569; white-space: pre-wrap; }
  .ap-muted { font-style: italic; color: #94a3b8; }
  .ap-grid { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
  .ap-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
  .ap-k { color: #94a3b8; font-weight: 600; }
  .ap-v { color: #334155; font-weight: 700; text-align: right; }
  .ap-open { margin-top: 14px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca; font-size: 12px; font-weight: 700; border-radius: 9px; padding: 8px; cursor: pointer; }
  .ap-open:hover { background: #4f46e5; color: #fff; }
  article.assign-sel { border-color: #6366f1 !important; box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
  .asg-group { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
  .asg-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 13px; background: #f8fafc; border: none; border-bottom: 1px solid #eef2f6; cursor: pointer; text-align: left; }
  .asg-caret { font-size: 11px; color: #94a3b8; width: 12px; }
  .asg-tipo { font-size: 9px; font-weight: 800; text-transform: uppercase; color: #4f46e5; background: #eef2ff; border-radius: 999px; padding: 2px 8px; }
  .asg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; color: #1e293b; }
  .asg-n { font-size: 11px; font-weight: 800; color: #64748b; background: #e2e8f0; border-radius: 999px; padding: 1px 9px; }
  .asg-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
  .asg-time { margin-left: 8px; display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: #4338ca; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
  .asg-check { display: inline-flex; align-items: center; padding: 0 2px; }
  .asg-check input { width: 17px; height: 17px; accent-color: #4f46e5; cursor: pointer; }
  .asg-bulkbar { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px dashed #c7d2fe; padding-top: 12px; }
  .asg-bulk-n { font-size: 12px; color: #475569; }
  .asg-bulk-n b { color: #4338ca; }
  .asg-bulk-lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #94a3b8; }
  .ap-sec { margin-top: 14px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
  .ap-files { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
  .ap-file { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12px; color: #334155; text-decoration: none; }
  .ap-file:hover { border-color: #a5b4fc; background: #f8fafc; }
  .ap-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ap-file i { color: #6366f1; flex: 0 0 auto; }
  .ap-tree { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
  .ap-titem { width: 100%; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #eef2f6; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
  .ap-titem:hover { border-color: #a5b4fc; background: #f8fafc; }
  .ap-tdot { width: 7px; height: 7px; border-radius: 999px; flex: 0 0 auto; }
  .ap-ttipo { font-size: 8px; font-weight: 800; text-transform: uppercase; color: #94a3b8; flex: 0 0 auto; }
  .ap-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; color: #334155; }
  .ap-tstatus { font-size: 9px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; flex: 0 0 auto; }
  .ap-assign { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #f8fafc; }
  .ap-alabel { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #94a3b8; }
  .ap-asave { margin-top: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 700; border-radius: 9px; padding: 8px; cursor: pointer; }
  .ap-asave:hover { background: #4338ca; }
  .dp-collapse-section { border: 0.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-top: 5px; }
  .dp-collapse-hdr { display: flex; align-items: center; gap: 7px; padding: 7px 10px; background: #fff; width: 100%; border: none; cursor: pointer; text-align: left; }
  .dp-collapse-label { font-size: 11px; color: #64748b; flex: 1; }
  .dp-collapse-count { font-size: 9px; background: #f1f5f9; color: #64748b; border-radius: 8px; padding: 1px 7px; border: 0.5px solid #e2e8f0; }
  .dp-collapse-body { padding: 8px 10px 10px; }
  .ic-pdf    { color: #A32D2D; }
  .ic-gdoc   { color: #185FA5; }
  .ic-gsheet { color: #0F6E56; }
  .ic-gpres  { color: #854F0B; }
  .ic-img    { color: #993556; }
  .ic-drive  { color: #0F6E56; }
  .ic-canva  { color: #185FA5; }
  .ic-link   { color: #534AB7; }
  /* Custom dropdown */
  .dp-dd-wrap { position: relative; display: inline-block; }
  .dp-dd-menu { position: absolute; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.13); z-index: 1000; min-width: 140px; padding: 4px; }
  .dp-dd-opt { padding: 6px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; color: #1e293b; white-space: nowrap; }
  .dp-dd-opt:hover { background: #f1f5f9; }
  .dp-dd-opt.dp-dd-active { background: #eef2ff; color: #4f46e5; font-weight: 600; }
  /* Progress weight badge */
  .dp-wt-badge { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 8px; }
  .dp-wt-green { background: #d1fae5; color: #065f46; }
  .dp-wt-amber { background: #fef3c7; color: #92400e; }
  .dp-wt-red   { background: #fee2e2; color: #991b1b; }

  /* ── Visão Grade (mapa de status por projeto) — gd-* ───────── */
  .gd-done{background:#16a34a} .gd-todo{background:#cbd5e1} .gd-doing{background:#3b82f6}
  .gd-soon{background:#f59e0b} .gd-late{background:#ef4444} .gd-review{background:#7c3aed}
  .gd-wrap{display:flex;flex-direction:column}
  .gd-toolbar{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;justify-content:space-between;margin-bottom:14px}
  .gd-legend{display:flex;gap:11px;flex-wrap:wrap;align-items:center;font-size:12px;color:#64748b}
  .gd-lg{display:inline-flex;gap:6px;align-items:center}
  .gd-sw{width:13px;height:13px;border-radius:3px;display:inline-block}
  .gd-marco-key{width:11px;height:11px;background:#94a3b8;display:inline-block;transform:rotate(45deg)}
  .gd-soonctl{display:inline-flex;gap:8px;align-items:center;font-size:12px;font-weight:600;color:#64748b}
  .gd-soonctl input[type=range]{accent-color:#4f46e5}
  .gd-page{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
  .gd-main{min-width:0}
  .gd-proj{background:#fff;border:1px solid #eef2f6;border-radius:14px;padding:14px 16px;margin-bottom:14px;box-shadow:0 1px 2px rgba(2,6,23,.03)}
  .gd-proj-head{display:flex;align-items:center;gap:10px}
  .gd-proj-name{font-size:14px;font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gd-proj-meta{font-size:12px;color:#64748b;font-weight:600;margin-left:auto;white-space:nowrap}
  .gd-proj-toggle{border:none;background:transparent;color:#94a3b8;cursor:pointer;width:24px;height:24px;border-radius:6px;flex:none;font-size:13px}
  .gd-proj-toggle:hover{background:#f8fafc;color:#334155}
  .gd-proj-toggle i{transition:transform .15s}
  .gd-collapsed .gd-proj-toggle i{transform:rotate(-90deg)}
  .gd-collapsed .gd-bar{margin-bottom:2px}
  .gd-collapsed .gd-proj-body{display:none}
  .gd-bar{height:5px;border-radius:99px;background:#e2e8f0;overflow:hidden;margin:8px 0 12px}
  .gd-bar > i{display:block;height:100%;background:#16a34a}
  .gd-stage{display:grid;grid-template-columns:168px 1fr;gap:10px;align-items:center;padding:2px 0}
  .gd-stage-label{font-size:13px;font-weight:600;color:#334155}
  .gd-stage.gd-sub .gd-stage-label{font-weight:500;color:#64748b;font-size:12px}
  .gd-branch{color:#94a3b8}
  .gd-cells{display:flex;flex-wrap:wrap;gap:3px;align-items:center}
  .gd-group{display:inline-flex;align-items:center;gap:2px;border:1px dashed #c7cdd6;border-radius:7px;padding:2px}
  .gd-cell{border-radius:4px;cursor:pointer;position:relative;border:1px solid rgba(2,6,23,.06);transition:transform .08s;flex:none}
  .gd-cell:hover{transform:scale(1.25);z-index:3;outline:2px solid rgba(79,70,229,.35)}
  .gd-cell.gd-sel{outline:2px solid #4f46e5;outline-offset:1px}
  .gd-cell.gd-marco{border-radius:3px;transform:rotate(45deg) scale(.7)}
  .gd-cell.gd-marco:hover{transform:rotate(45deg) scale(.88)}
  .gd-dot{width:9px;height:9px;border-radius:3px;display:inline-block;flex:none}
  .gd-preview{position:sticky;top:0;align-self:start;max-height:calc(100vh - 130px);overflow:auto;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 1px 2px rgba(2,6,23,.03)}
  .gd-hint{display:flex;gap:8px;align-items:flex-start;margin:14px 16px 0;padding:10px 12px;background:#eef2ff;border:1px solid #e0e7ff;border-radius:10px;color:#4338ca;font-size:12px;font-weight:600}
  .gd-preview:not(.gd-empty) .gd-hint{display:none}
  .gd-preview.gd-empty .gd-pv-fill{opacity:.45;filter:grayscale(.4)}
  .gd-hint-dot{width:18px;height:18px;border-radius:50%;background:#4f46e5;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:10px;flex:none}
  .gd-pv-h{padding:14px 16px 12px;border-bottom:1px solid #eef2f6}
  .gd-eyebrow{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8}
  .gd-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:600;border:.5px solid;margin-top:8px}
  .gd-pill-done{background:#E1F5EE;color:#0F6E56;border-color:#9FE1CB}
  .gd-pill-late{background:#FCEBEB;color:#A32D2D;border-color:#F7C1C1}
  .gd-pill-soon{background:#FAEEDA;color:#854F0B;border-color:#FAC775}
  .gd-pill-review{background:#F3EFFE;color:#6D28D9;border-color:#C4B5FD}
  .gd-pill-doing{background:#E6F1FB;color:#185FA5;border-color:#B5D4F4}
  .gd-pill-todo{background:#F1EFE8;color:#5F5E5A;border-color:#D3D1C7}
  .gd-pv-title{font-size:15px;font-weight:700;line-height:1.3;margin:8px 0 0;color:#0f172a}
  .gd-open-full{display:inline-flex;align-items:center;gap:6px;margin-top:10px;border:1px solid #c7d2fe;background:#eef2ff;color:#4338ca;font-size:11px;font-weight:700;border-radius:8px;padding:5px 9px;cursor:pointer}
  .gd-open-full:hover{background:#e0e7ff}
  .gd-pv-body{padding:12px 16px 16px;font-size:13px}
  .gd-row{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:.5px solid #e2e8f0}
  .gd-row .k{color:#64748b;font-size:12px;font-weight:600}
  .gd-row .v{color:#334155;font-weight:600;text-align:right}
  .gd-lbl{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#94a3b8;margin-top:16px}
  .gd-prog{height:6px;border-radius:99px;background:#e2e8f0;overflow:hidden;margin:8px 0 4px}
  .gd-prog > i{display:block;height:100%;background:#4f46e5;transition:width .25s}
  .gd-prog-txt{font-size:12px;color:#64748b}
  .gd-stlist{margin-top:8px;display:flex;flex-direction:column;gap:8px}
  .gd-st-row{display:flex;align-items:center;gap:8px;border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:9px 10px}
  .gd-st-row.late{border-color:#fecaca;background:#fef2f2}
  .gd-st-main{min-width:0;flex:1}
  .gd-st-title{font-size:12px;font-weight:700;color:#1e293b;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .gd-st-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
  .gd-st-pill{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;color:#475569;font-size:10px;font-weight:700;border-radius:5px;padding:2px 6px}
  .gd-st-pill.late{background:#fee2e2;color:#b91c1c}
  .gd-st-open{border:1px solid #e2e8f0;background:#fff;color:#64748b;width:30px;height:30px;border-radius:8px;cursor:pointer;flex:none}
  .gd-st-open:hover{color:#4f46e5;border-color:#c7d2fe}
  @media (max-width:1100px){ .gd-page{grid-template-columns:1fr} .gd-preview{display:none} }

  /* ── Minhas: board/grade por prazo + filtro do Kanban ─────── */
  .mn-scopebar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
  .mn-scope{display:inline-flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;flex:0 0 auto}
  .mn-scope-btn{border:none;background:#fff;padding:7px 13px;cursor:pointer;font-weight:700;font-size:12px;color:#475569;display:inline-flex;align-items:center;gap:6px}
  .mn-scope-btn + .mn-scope-btn{border-left:1px solid #e2e8f0}
  .mn-scope-btn.active{background:#4f46e5;color:#fff}
  .mn-teamsel{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}
  .mn-teamchip{display:inline-flex;align-items:center;gap:5px;border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:4px 10px;cursor:pointer;font-weight:700;font-size:11px;color:#475569}
  .mn-teamchip.on{border-color:#6366f1;background:#eef2ff;color:#4338ca}
  .mn-teamchip input{accent-color:#4f46e5;cursor:pointer}
  .mn-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
  .mn-seg{display:inline-flex;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff;flex:0 0 auto}
  .mn-seg button{border:none;background:#fff;padding:7px 12px;cursor:pointer;font-weight:700;font-size:12px;color:#475569;display:inline-flex;align-items:center;gap:6px}
  .mn-seg button + button{border-left:1px solid #e2e8f0}
  .mn-seg button.active{background:#4f46e5;color:#fff}
  .mn-seg-lbl{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8}
  .mn-chips{display:flex;flex-wrap:wrap;gap:6px}
  .mn-chip{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:5px 11px;cursor:pointer;font-weight:700;font-size:11px;color:#475569;display:inline-flex;align-items:center;gap:6px}
  .mn-chip .c{width:8px;height:8px;border-radius:50%}
  .mn-chip.active{background:#4f46e5;border-color:#4f46e5;color:#fff}
  .mn-chip.late.active{background:#ef4444;border-color:#ef4444}
  .mn-toggle{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:6px 12px;font-weight:800;font-size:11px;cursor:pointer;color:#475569;display:inline-flex;align-items:center;gap:7px}
  .mn-toggle .sw{width:30px;height:17px;border-radius:999px;background:#cbd5e1;position:relative;transition:.15s}
  .mn-toggle .sw::after{content:"";position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;transition:.15s}
  .mn-toggle.on{color:#4f46e5;border-color:#c7d2fe;background:#eef2ff}
  .mn-toggle.on .sw{background:#4f46e5}
  .mn-toggle.on .sw::after{left:15px}
  .mn-board{display:flex;gap:10px;overflow-x:auto;padding-bottom:8px;align-items:flex-start}
  .mn-col{flex:0 0 250px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;display:flex;flex-direction:column;max-height:calc(100vh - 240px)}
  .mn-colhd{padding:8px 11px;font-size:11px;font-weight:800;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:6px;border-radius:12px 12px 0 0}
  .mn-colhd-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .bsort{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border:1px solid #e2e8f0;border-radius:6px;background:#fff;color:#94a3b8;cursor:pointer;font-size:10px;padding:0;flex:0 0 auto}
  .bsort:hover{border-color:#a5b4fc;color:#4f46e5}
  .bsort.on{background:#4f46e5;border-color:#4f46e5;color:#fff}
  .mn-colhd .bsort{border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.18);color:#fff}
  .mn-colhd .bsort:hover{background:rgba(255,255,255,.32)}
  .mn-colhd .bsort.on{background:#fff;border-color:#fff;color:#4338ca}
  .mn-colbody{padding:8px;overflow-y:auto;scrollbar-gutter:stable;flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}
  .mn-grp{margin-bottom:14px}
  .mn-grphd{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:12px;font-weight:800}
  .mn-tag{font-size:10px;font-weight:800;color:#fff;border-radius:999px;padding:2px 10px}
  .mn-n{color:#94a3b8;font-weight:700;font-size:10.5px}
  .mn-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:8px}
  .mn-card{border:1px solid #e2e8f0;border-radius:9px;overflow:hidden;background:#fff;cursor:pointer;display:flex;align-items:stretch;flex-shrink:0;width:100%}
  .mn-card:hover{border-color:#a5b4fc;box-shadow:0 1px 3px rgba(79,70,229,.12)}
  .mn-strip{width:5px;flex:0 0 auto}
  .mn-cbody{min-width:0;flex:1;padding:8px 10px}
  .mn-title{font-size:11.5px;font-weight:800;color:#1e293b;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mn-id{font-family:ui-monospace,Consolas,monospace;font-size:9px;color:#6366f1;font-weight:800;margin-right:5px}
  .mn-crumb{color:#94a3b8;font-size:10px;font-weight:600;margin:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mn-meta{display:flex;align-items:center;gap:6px;margin-top:6px;flex-wrap:wrap}
  .mn-st{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:2px 7px;font-size:9.5px;font-weight:800}
  .mn-prog{display:flex;align-items:center;gap:6px;margin-top:7px}
  .mn-prog .bar{height:4px;border-radius:999px;background:#eef2f7;overflow:hidden;flex:1}
  .mn-prog .bar > i{display:block;height:100%;background:#6366f1}
  .mn-prog .txt{font-size:9.5px;font-weight:800;color:#64748b;min-width:26px;text-align:right}
  .mb-late{background:#ef4444} .mb-hoje{background:#f59e0b} .mb-semana{background:#3b82f6}
  .mb-prox{background:#8b5cf6} .mb-depois{background:#64748b} .mb-done{background:#10b981}
  .kf-wrap{position:relative;display:inline-block}
  .kf-btn{border:1px solid #e2e8f0;background:#fff;border-radius:10px;padding:7px 12px;font-weight:700;font-size:12px;color:#475569;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
  .kf-btn:hover{border-color:#c7d2fe;color:#4f46e5}
  .kf-panel{position:absolute;z-index:40;top:calc(100% + 6px);left:0;width:248px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,.12);padding:10px}
  .kf-sec{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;margin:8px 4px 4px}
  .kf-opt{display:flex;align-items:center;gap:8px;padding:6px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;color:#334155}
  .kf-opt:hover{background:#f8fafc}
  .kf-opt input{accent-color:#4f46e5;width:15px;height:15px}
  /* filtro de escopo iconizado (Kanban/Lista/Gantt/Calendario) */
  .sf-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
  .sf-lbl{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;margin-right:2px}
  .sf-btn{border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:6px 12px;font-weight:700;font-size:12px;color:#64748b;cursor:pointer;display:inline-flex;align-items:center;gap:7px}
  .sf-btn:hover{border-color:#c7d2fe;color:#4f46e5}
  .sf-btn.on{background:#4f46e5;border-color:#4f46e5;color:#fff}
  .sf-btn .sf-badge{background:#eef2ff;color:#4f46e5;border-radius:999px;padding:0 6px;font-size:10px;font-weight:800}
  .sf-btn.on .sf-badge{background:rgba(255,255,255,.25);color:#fff}
