/* Kandu — estilos. Só tokens (var(--…)); nada de cores soltas fora das cores de projeto. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--fs-xl); } h2 { font-size: 16px; font-weight: 600; } h3 { font-size: var(--fs-sm); font-weight: 600; }
p { margin: 0 0 var(--s-2); }
a { color: var(--c-accent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--c-text-muted); } .small { font-size: var(--fs-xs); } .text-danger { color: var(--c-danger); }
.grow { flex: 1 1 auto; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s-2); } .row-end { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-3); }
.is-done-text { text-decoration: line-through; color: var(--c-text-muted); }
.boot { height: 100vh; background: var(--c-surface); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--c-bg); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background var(--t-fast); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; height: 40px; }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); } .btn-primary:hover { background: var(--c-accent-hover); }
.btn-secondary { background: var(--c-bg); border-color: var(--c-border-input); color: var(--c-text); } .btn-secondary:hover { background: var(--c-surface); }
.btn-ghost { background: transparent; color: var(--c-text-muted); } .btn-ghost:hover { background: var(--c-surface-2); color: var(--c-text); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.is-loading { position: relative; color: transparent; } .btn.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid var(--c-on-accent); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-text-muted); cursor: pointer; }
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.icon-btn.is-on, .icon-btn.is-fav { color: var(--c-accent); } .icon-btn.is-fav svg { fill: currentColor; }
.icon-xs { min-width: 22px; height: 22px; padding: 0 3px; }
.count { font-size: var(--fs-xs); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-bg); cursor: pointer; font-size: 13px; }
.chip[aria-checked="true"] { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Formulários */
.input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--c-border-input); border-radius: var(--r-sm); background: var(--c-bg); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.input:focus { outline: 2px solid var(--c-focus); outline-offset: -1px; border-color: var(--c-focus); }
.field { display: block; margin-bottom: var(--s-4); } .label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.form-error { color: var(--c-danger); font-size: 13px; min-height: 0; margin: 0 0 var(--s-2); } .form-error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); } @media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.mini-select { height: 26px; padding: 0 4px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-bg); font-size: 12px; max-width: 160px; }

/* Avatar e pílulas */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; color: #fff; font-weight: 600; letter-spacing: .02em; user-select: none; }
.avatar-empty { background: transparent; color: var(--c-text-muted); border: 1px dashed var(--c-border-input); }
.avatars { display: inline-flex; } .avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--c-bg); } .avatars .avatar:first-child { margin-left: 0; }
.more { font-size: var(--fs-xs); color: var(--c-text-muted); margin-left: 4px; align-self: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-sm { height: 18px; font-size: 11px; padding: 0 6px; } .pills { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pill-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--c-text-muted); padding: 0 4px; }
.badge-warn { color: var(--c-warning); font-weight: 600; }
.proj-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--c-surface-2); color: var(--c-text); font-size: 12px; max-width: 220px; }
.proj-chip a { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.proj-chip.small { font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--c-border); background: var(--c-bg); font-weight: 600; font-size: 12px; cursor: pointer; }

/* Layout */
#app { height: 100%; }
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--l-topbar); display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); background: var(--c-bg); border-bottom: 1px solid var(--c-border); z-index: 20; }
.menu-btn { display: none; }
.create-btn { border-radius: var(--r-pill); }
.topbar-search-wrap { position: relative; flex: 0 1 480px; display: flex; align-items: center; margin-left: auto; }
.topbar-search-wrap svg { position: absolute; left: 10px; color: var(--c-text-muted); }
.topbar-search { width: 100%; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-surface); }
.topbar-search:focus { background: var(--c-bg); outline: 2px solid var(--c-focus); outline-offset: -1px; }
.avatar-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; cursor: pointer; }
.sidebar { position: fixed; top: var(--l-topbar); bottom: 0; left: 0; width: var(--l-sidebar); background: var(--c-sidebar); border-right: 1px solid var(--c-border); overflow-y: auto; padding: var(--s-2) var(--s-2) var(--s-4); display: flex; flex-direction: column; gap: 2px; z-index: 15; }
#main { position: fixed; top: var(--l-topbar); left: var(--l-sidebar); right: 0; bottom: 0; display: flex; }
#view { flex: 1 1 auto; overflow: auto; outline: none; min-width: 0; }
.ws-switch { margin-bottom: var(--s-2); }
.ws-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; font-weight: 700; }
.ws-btn:hover { background: var(--c-surface-2); }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--c-accent); color: var(--c-on-accent); flex: none; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-text); text-decoration: none !important; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--c-surface-2); }
.nav-item.is-active { background: var(--c-accent-soft); color: var(--c-accent); font-weight: 600; }
.nav-item svg { flex: none; }
.nav-project { min-height: 30px; padding-left: 14px; }
.nav-lock { margin-left: auto; color: var(--c-text-muted); display: inline-flex; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-on-accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-group { margin-top: var(--s-3); }
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.nav-team { margin-bottom: 4px; } .nav-team-name { font-weight: 600; font-size: 13px; padding-left: 10px; min-height: 30px; display: flex; align-items: center; gap: 8px; }
.scrim { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform var(--t-base) var(--ease); box-shadow: var(--sh-pop); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--l-topbar) 0 0 0; background: rgba(16,32,29,.3); z-index: 14; }
  #main { left: 0; }
  .hide-sm { display: none; }
  .topbar-search-wrap { flex-basis: 200px; }
}

/* Página */
.page-head { padding: var(--s-5) var(--s-6) 0; border-bottom: 1px solid var(--c-border); background: var(--c-bg); position: sticky; top: 0; z-index: 5; }
.page-title-row { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); flex-wrap: wrap; }
.page-title { font-size: var(--fs-lg); font-weight: 700; }
.page-title-input { font-size: var(--fs-lg); font-weight: 700; border: 1px solid transparent; border-radius: var(--r-sm); padding: 2px 6px; background: transparent; min-width: 120px; max-width: 520px; field-sizing: content; }
.page-title-input:hover:not([readonly]) { border-color: var(--c-border); } .page-title-input:focus { outline: 2px solid var(--c-focus); }
.proj-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-md); color: #fff; flex: none; }
.tabs { display: flex; gap: 2px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 2px solid transparent; color: var(--c-text-muted); font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.tab:hover { color: var(--c-text); }
.tab[aria-selected="true"] { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.toolbar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-6); flex-wrap: wrap; }
.toolbar:empty { display: none; }
.tool-select { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 8px; border: 1px solid var(--c-border); border-radius: var(--r-sm); color: var(--c-text-muted); background: var(--c-bg); }
.tool-select select { border: 0; background: transparent; height: 26px; font-size: 13px; cursor: pointer; color: var(--c-text); max-width: 200px; }
.view-content { padding: 0 var(--s-6) var(--s-7); }
.hint { margin-top: var(--s-3); }
.banner { padding: 8px 16px; background: var(--c-surface-2); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.banner-warn { background: #fdf3e1; color: var(--c-warning); }

/* Lista de tarefas */
.tasklist { min-width: 640px; }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--grid, minmax(280px, 1fr) 150px 140px); }
.tl-head { position: sticky; top: 0; background: var(--c-bg); border-bottom: 1px solid var(--c-border); font-size: 12px; color: var(--c-text-muted); z-index: 2; }
.tl-cell { display: flex; align-items: center; min-width: 0; padding: 0 8px; border-right: 1px solid var(--c-border); min-height: 38px; }
.tl-cell:last-child { border-right: 0; }
.tl-head .tl-cell { min-height: 32px; font-weight: 600; }
.tl-field { overflow: hidden; }
.tl-row { border-bottom: 1px solid var(--c-border); background: var(--c-bg); cursor: pointer; }
.tl-row:hover { background: var(--c-surface); }
.tl-row.is-open { background: var(--c-accent-soft); }
.tl-row.is-selected { background: var(--c-accent-soft); box-shadow: inset 3px 0 0 var(--c-accent); }
.tl-row.is-done .tl-name-input { color: var(--c-text-muted); }
.tl-row.is-dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 2px 0 var(--c-accent) !important; } .drop-after { box-shadow: inset 0 -2px 0 var(--c-accent) !important; }
.drop-into { background: var(--c-accent-soft) !important; }
.tl-name { gap: 6px; }
.drag, .drag-space { width: 14px; flex: none; color: var(--c-text-muted); opacity: 0; cursor: grab; display: inline-flex; }
.tl-row:hover .drag { opacity: 1; }
.tl-name-input { flex: 1 1 auto; min-width: 40px; height: 28px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; padding: 0 4px; cursor: text; }
.tl-name-input:focus { border-color: var(--c-focus); background: var(--c-bg); outline: none; }
.tl-name-input[readonly] { cursor: pointer; }
.tl-badges { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.tl-open { opacity: 0; } .tl-row:hover .tl-open, .tl-row:focus-within .tl-open { opacity: 1; }
.tl-section { display: flex; align-items: center; gap: 4px; padding: 16px 0 6px; border-bottom: 1px solid var(--c-border); }
.tl-section-name { font-weight: 700; font-size: 15px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; padding: 2px 6px; min-width: 60px; field-sizing: content; }
input.tl-section-name:focus { border-color: var(--c-focus); outline: none; }
.tl-count { font-size: 12px; margin: 0 4px; }
.tl-add { display: flex; align-items: center; gap: 6px; width: 100%; height: 36px; padding: 0 30px; border: 0; border-bottom: 1px solid var(--c-border); background: transparent; color: var(--c-text-muted); cursor: pointer; text-align: left; }
.tl-add:hover { background: var(--c-surface); color: var(--c-text); }
.tl-empty { padding: 12px 30px; }
.cell-btn { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 0 4px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; color: var(--c-text); min-width: 0; }
.cell-btn:hover:not(:disabled) { border-color: var(--c-border); background: var(--c-bg); }
.cell-btn:disabled { cursor: default; }
.is-overdue { color: var(--c-danger) !important; font-weight: 600; } .is-soon { color: var(--c-success) !important; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
#view:has(.tasklist) .view-content { overflow-x: auto; }

/* Check de conclusão */
.check { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; border: 0; background: transparent; color: var(--c-text-muted); cursor: pointer; border-radius: 50%; }
.check:hover { color: var(--c-success); }
.check.is-done { color: #fff; background: var(--c-success); }
.check-milestone.is-done, .check-approval.is-done { background: transparent; color: var(--c-success); }
.check-milestone.is-done svg, .check-approval.is-done svg { fill: currentColor; }

/* Quadro */
.board { display: flex; gap: var(--s-3); align-items: flex-start; overflow-x: auto; padding-bottom: var(--s-4); min-height: 60vh; }
.board-col { flex: 0 0 280px; background: var(--c-surface); border-radius: var(--r-lg); padding: var(--s-2); display: flex; flex-direction: column; gap: var(--s-2); max-height: calc(100vh - 230px); }
.board-col-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px; } .board-col-head h3 { flex: 1; }
.board-cards { display: flex; flex-direction: column; gap: var(--s-2); overflow-y: auto; min-height: 20px; }
.card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 10px; box-shadow: var(--sh-card); cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.card:hover { border-color: var(--c-border-input); }
.card.is-dragging { opacity: .4; } .card.is-done .card-name { color: var(--c-text-muted); }
.card-top { display: flex; gap: 8px; align-items: flex-start; } .card-name { font-weight: 500; word-break: break-word; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; } .card-field { font-size: 12px; }
.card-new { cursor: default; }
.board-add { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-text-muted); cursor: pointer; }
.board-add:hover { background: var(--c-surface-2); color: var(--c-text); }
.board-col-add { border: 2px dashed var(--c-border); background: transparent; align-items: center; justify-content: center; flex-direction: row; min-height: 60px; cursor: pointer; color: var(--c-text-muted); font-weight: 600; }

/* Calendário */
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: var(--s-3); }
.cal-title { font-size: 16px; margin-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--c-border); border-left: 1px solid var(--c-border); }
.cal-dow { padding: 6px; font-size: 12px; font-weight: 600; color: var(--c-text-muted); border-right: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); text-transform: capitalize; }
.cal-cell { min-height: 112px; padding: 4px; border-right: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.is-other { background: var(--c-surface); } .cal-cell.is-other .cal-day span { color: var(--c-text-muted); }
.cal-day { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; }
.cal-cell.is-today .cal-day span { background: var(--c-accent); color: var(--c-on-accent); border-radius: var(--r-pill); padding: 0 7px; }
.cal-add { opacity: 0; } .cal-cell:hover .cal-add, .cal-add:focus { opacity: 1; }
.cal-task { display: flex; align-items: center; gap: 4px; width: 100%; padding: 2px 6px; border: 1px solid var(--c-border); border-left: 3px solid; border-radius: var(--r-sm); background: var(--c-bg); font-size: 12px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-task.is-done { color: var(--c-text-muted); text-decoration: line-through; } .cal-task.is-span { background: var(--c-accent-soft); }
.cal-more { border: 0; background: transparent; color: var(--c-accent); font-size: 12px; cursor: pointer; text-align: left; padding: 0 6px; }

/* Painel da tarefa */
.task-pane { flex: 0 0 var(--l-detail-pane); max-width: 100%; border-left: 1px solid var(--c-border); background: var(--c-bg); display: flex; flex-direction: column; outline: none; box-shadow: var(--sh-pop); z-index: 6; }
.task-pane.is-full { position: fixed; inset: var(--l-topbar) 0 0 0; flex-basis: auto; z-index: 25; }
.task-pane.is-full .pane-body, .task-pane.is-full .pane-foot { max-width: 860px; width: 100%; margin: 0 auto; }
@media (max-width: 1100px) { .task-pane { position: fixed; top: var(--l-topbar); right: 0; bottom: 0; width: min(100%, var(--l-detail-pane)); z-index: 25; } }
.pane-head { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.complete-btn.is-done { background: var(--c-success); color: #fff; border-color: var(--c-success); }
.pane-body { flex: 1 1 auto; overflow-y: auto; padding: var(--s-4) var(--s-5); }
.crumbs { font-size: 12px; color: var(--c-text-muted); margin-bottom: 6px; }
.title-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: var(--s-3); } .title-row .check { margin-top: 6px; }
.pane-title { flex: 1; font-size: 22px; font-weight: 700; line-height: 1.3; border: 1px solid transparent; border-radius: var(--r-sm); padding: 2px 6px; resize: none; overflow: hidden; background: transparent; }
.pane-title:hover:not([readonly]) { border-color: var(--c-border); } .pane-title:focus { outline: 2px solid var(--c-focus); }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0 0 var(--s-4); align-items: center; }
.props dt { color: var(--c-text-muted); font-size: 13px; } .props dd { margin: 0; min-width: 0; }
.deps { display: flex; flex-direction: column; gap: 4px; } .dep { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pane-sec { margin-bottom: var(--s-5); } .pane-sec h3 { margin-bottom: var(--s-2); }
.notes { width: 100%; min-height: 72px; border: 1px solid transparent; border-radius: var(--r-sm); padding: 8px; resize: none; background: transparent; line-height: 1.5; }
.notes:hover:not([readonly]) { border-color: var(--c-border); } .notes:focus { outline: 2px solid var(--c-focus); background: var(--c-bg); }
.subtasks { border-top: 1px solid var(--c-border); }
.subtask { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.subtask.is-done .subtask-name { color: var(--c-text-muted); text-decoration: line-through; }
.subtask-name { color: var(--c-text); } .subtask-input { margin-top: 6px; height: 32px; }
.due { font-size: 12px; color: var(--c-text-muted); }
.attachments { display: grid; gap: 8px; }
.attachment { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--c-border); border-radius: var(--r-md); }
.attachment img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-sm); }
.att-info { display: flex; flex-direction: column; flex: 1; min-width: 0; } .att-info a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-ico { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-surface-2); border-radius: var(--r-sm); color: var(--c-text-muted); }
.activity { border-top: 1px solid var(--c-border); padding-top: var(--s-4); background: var(--c-surface); margin: 0 calc(-1 * var(--s-5)); padding-left: var(--s-5); padding-right: var(--s-5); padding-bottom: var(--s-4); }
.story { display: flex; gap: 10px; margin: 12px 0; } .story-main { flex: 1; min-width: 0; }
.story-head { display: flex; align-items: center; gap: 8px; font-size: 13px; } .story-body { margin-top: 2px; word-wrap: break-word; line-height: 1.5; }
.story-sys { font-size: 12px; color: var(--c-text-muted); margin: 6px 0 6px 38px; }
.mention { color: var(--c-accent); font-weight: 600; background: var(--c-accent-soft); border-radius: 4px; padding: 0 3px; }
.pane-foot { border-top: 1px solid var(--c-border); padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--c-bg); }
.composer { display: flex; gap: 8px; align-items: flex-start; } .composer .btn { align-self: flex-end; }
.composer-input { flex: 1; min-height: 40px; }
.followers { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }

/* Popover, menu, seletores */
.popover { position: fixed; z-index: 60; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--sh-pop); padding: 6px; max-height: 70vh; overflow-y: auto; }
.menu { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; }
.menu-item:hover:not(:disabled), .menu-item:focus { background: var(--c-surface-2); outline: none; }
.menu-item.is-danger { color: var(--c-danger); } .menu-item:disabled { color: var(--c-text); cursor: default; font-weight: 600; }
.menu-hint { margin-left: auto; font-size: 12px; color: var(--c-text-muted); }
.menu-sep { height: 1px; background: var(--c-border); margin: 4px 0; }
.picker { display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.picker-title { font-size: 12px; font-weight: 700; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pick-list { display: flex; flex-direction: column; gap: 1px; max-height: 280px; overflow-y: auto; }
.pick-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 8px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; }
.pick-item:hover, .pick-item:focus { background: var(--c-surface-2); outline: none; }
.pick-item[aria-selected="true"] { background: var(--c-accent-soft); }
.pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pick-sub { font-size: 12px; color: var(--c-text-muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty { padding: 8px; color: var(--c-text-muted); font-size: 13px; }
.pick-all { color: var(--c-accent); border-top: 1px solid var(--c-border); border-radius: 0; }
.date-picker .field { margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.swatch[aria-checked="true"] { border-color: var(--c-text); }

/* Modal e toast */
.modal-back { position: fixed; inset: 0; background: rgba(16,32,29,.45); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--c-bg); border-radius: var(--r-lg); box-shadow: var(--sh-pop); width: 100%; display: flex; flex-direction: column; max-height: 84vh; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 720px; } .modal-lg { max-width: 640px; }
.modal-body { max-height: calc(100vh - 180px); overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; } .modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; } .modal-body h3 { margin: 16px 0 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--c-border); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 90vw; padding: 8px 8px 8px 16px; border-radius: var(--r-md); background: var(--c-text); color: #fff; box-shadow: var(--sh-pop); animation: up var(--t-base) var(--ease); }
.toast .icon-btn { color: #fff; } .toast .icon-btn:hover { background: rgba(255,255,255,.12); }
.toast-action { color: #b6efe6 !important; }
.toast-error { background: var(--c-danger); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* Blocos */
.card-block { border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); background: var(--c-bg); margin-bottom: var(--s-4); }
.card-block h2 { margin-bottom: var(--s-3); }
.empty { text-align: center; padding: var(--s-7) var(--s-4); color: var(--c-text-muted); } .empty h3 { color: var(--c-text); font-size: 16px; margin: 8px 0 4px; }
.empty-art { color: var(--c-accent); }
.skeleton { padding: var(--s-6); display: flex; flex-direction: column; gap: 10px; }
.skel-row { height: 20px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 50%, var(--c-surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress { height: 10px; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; margin-bottom: 8px; } .progress span { display: block; height: 100%; background: var(--c-success); }

/* Visão geral */
.overview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-4); padding-top: var(--s-4); }
@media (max-width: 1000px) { .overview { grid-template-columns: 1fr; } }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.role { display: flex; gap: 10px; align-items: center; } .role-add { border: 0; background: transparent; cursor: pointer; color: var(--c-text-muted); padding: 0; }
.status-card { border-left: 4px solid; padding: 8px 12px; margin-bottom: 12px; background: var(--c-surface); border-radius: var(--r-sm); }
.messages { max-width: 760px; padding-top: var(--s-4); } .messages .input { margin-bottom: 8px; }
.message .row { margin-bottom: 8px; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding-top: var(--s-4); }
.file-card { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--c-border); border-radius: var(--r-md); color: var(--c-text); }
.file-card img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--r-sm); } .file-card .file-ico { width: 100%; height: 120px; }

/* Início */
.home { max-width: 1100px; margin: 0 auto; padding: var(--s-6); }
.home-date { text-align: center; margin: 0; } .home-greet { text-align: center; font-size: 30px; margin: 4px 0 8px; }
.home-stats { text-align: center; margin-bottom: var(--s-6); color: var(--c-text-muted); }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); } .home-grid > :first-child { grid-row: span 2; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.home-task { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--c-border); }
.home-task a { color: var(--c-text); }
.home-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.home-project { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); color: var(--c-text); }
.home-project:hover { background: var(--c-surface); text-decoration: none; } .home-project.is-archived { opacity: .6; }
.home-people { display: flex; flex-wrap: wrap; gap: 16px; } .person { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; font-size: 12px; text-align: center; }

/* Caixa de entrada */
.inbox-list { max-width: 860px; }
.inbox-day { margin: var(--s-4) 0 var(--s-2); text-transform: capitalize; color: var(--c-text-muted); font-size: 12px; }
.inbox-item { position: relative; display: flex; gap: 12px; padding: 12px 12px 12px 20px; border: 1px solid var(--c-border); border-radius: var(--r-md); margin-bottom: 8px; cursor: pointer; background: var(--c-bg); }
.inbox-item:hover { border-color: var(--c-border-input); } .inbox-item.is-open { background: var(--c-accent-soft); }
.inbox-item.is-unread .inbox-title { font-weight: 700; }
.unread-dot { position: absolute; left: 7px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .inbox-title { font-size: 15px; }
.inbox-quote { border-left: 3px solid var(--c-border); padding-left: 8px; margin: 4px 0; color: var(--c-text); }
.inbox-actions { display: flex; gap: 2px; align-self: flex-start; opacity: .6; } .inbox-item:hover .inbox-actions, .inbox-item:focus-within .inbox-actions { opacity: 1; }

/* Busca, configurações, compartilhar */
.search-big { height: 44px; font-size: 16px; margin-bottom: 12px; } .search-filters { padding-bottom: 12px; grid-template-columns: repeat(3, 1fr); }
.search-results h3 { margin: 16px 0 8px; }
.settings { max-width: 720px; padding-top: var(--s-4); }
.share-add { display: grid; grid-template-columns: 1fr 160px auto; gap: 8px; margin-bottom: 16px; } @media (max-width: 600px) { .share-add { grid-template-columns: 1fr; } }
.share-list { display: flex; flex-direction: column; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.invite-res { margin-bottom: 10px; } .invite-res .input { margin-top: 4px; font-size: 12px; }
.shortcuts td { padding: 6px 12px 6px 0; } kbd { font-family: var(--mono); background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 6px; font-size: 12px; }

/* Autenticação */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--c-surface); }
.auth-card { width: 100%; max-width: 420px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--sh-card); }
.auth-card h1 { font-size: 24px; margin: 16px 0 4px; } .auth-card > p { margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.auth-card form .btn-block { margin: 8px 0 12px; }
.auth-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border); text-align: center; color: var(--c-text-muted); }

/* Barra de ações em massa */
.bulk-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--sh-pop); z-index: 30; flex-wrap: wrap; max-width: 95vw; }
.bulk-bar[hidden] { display: none; }

@media (max-width: 600px) {
  .page-head { padding: var(--s-4) var(--s-4) 0; } .toolbar, .view-content { padding-left: var(--s-4); padding-right: var(--s-4); }
  .props { grid-template-columns: 100px 1fr; } .pane-body { padding: var(--s-3); }
  .home { padding: var(--s-4); } .search-filters { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .topbar, .sidebar, .pane-head, .pane-foot, .toolbar { display: none !important; } #main { position: static; } .task-pane { box-shadow: none; border: 0; } }

/* ================= Tema escuro ================= */
[data-theme="dark"] {
  --c-bg: #161b1a; --c-surface: #1d2423; --c-surface-2: #263030; --c-sidebar: #121716;
  --c-border: #2f3a38; --c-border-input: #6b7875; --c-text: #e8eeec; --c-text-muted: #a3b0ac;
  --c-accent: #3fb8a8; --c-accent-hover: #5cc9ba; --c-accent-soft: #1b3532; --c-on-accent: #0a1a17;
  --c-danger: #f97066; --c-success: #47cd89; --c-warning: #fdb022; --c-focus: #5cc9ba;
  --sh-card: 0 1px 2px rgba(0,0,0,.4); --sh-pop: 0 12px 32px rgba(0,0,0,.55);
  color-scheme: dark;
}
[data-theme="dark"] .btn-danger { color: #1a0a08; }
[data-theme="dark"] img.avatar { background: var(--c-surface-2); }

/* ================= Texto rico ================= */
.rich-view { min-height: 40px; padding: 8px; border: 1px solid transparent; border-radius: var(--r-sm); cursor: text; line-height: 1.55; }
.rich-view[role="button"]:hover { border-color: var(--c-border); }
.rich-view.is-empty { color: var(--c-text-muted); }
.rich-input { min-height: 96px; border-color: var(--c-border) !important; }
.rt-p { margin: 0 0 4px; } .rt-gap { height: 6px; }
.rt-h1 { font-size: 17px; margin: 8px 0 4px; } .rt-h2 { font-size: 15px; margin: 6px 0 4px; }
.rt-list { margin: 2px 0 6px; padding-left: 22px; } .rt-check { list-style: none; margin: 2px 0 6px; padding: 0; }
.rt-check li { display: flex; gap: 8px; align-items: flex-start; } .rt-check li.is-done span { text-decoration: line-through; color: var(--c-text-muted); }
.rt-check input { margin-top: 4px; accent-color: var(--c-accent); }
.rt-quote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--c-border-input); color: var(--c-text-muted); }
.rt-code, .rich-view code, .story-body code { font-family: var(--mono); font-size: 12.5px; background: var(--c-surface-2); border-radius: 4px; padding: 1px 4px; }
.rt-code { display: block; padding: 8px 10px; overflow-x: auto; white-space: pre; }
a.mention { background: var(--c-accent-soft); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.fmt-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 2px; border: 1px solid var(--c-border); border-bottom: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--c-surface); }
.fmt-sep { width: 1px; height: 16px; background: var(--c-border); margin: 0 4px; }
.composer-box { flex: 1; display: flex; flex-direction: column-reverse; }
.composer-box .fmt-bar { border-bottom: 1px solid var(--c-border); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.composer-box .composer-input { border-radius: var(--r-sm) var(--r-sm) 0 0; }

/* ================= Lista: subtarefas e totais ================= */
.tl-row.tl-sub { background: var(--c-surface); } .tl-row.tl-sub:hover { background: var(--c-surface-2); }
.tl-caret { flex: none; } .tl-caret-space { display: inline-block; width: 22px; flex: none; }
.tl-row.tl-total { cursor: default; background: var(--c-surface); font-size: 13px; } .tl-row.tl-total:hover { background: var(--c-surface); }

/* ================= Controles ================= */
.seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: var(--r-sm); overflow: hidden; }
.seg-btn { border: 0; background: var(--c-bg); padding: 4px 10px; cursor: pointer; font-size: 13px; }
.seg-btn + .seg-btn { border-left: 1px solid var(--c-border); }
.seg-btn[aria-pressed="true"] { background: var(--c-accent-soft); color: var(--c-accent); font-weight: 600; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--c-border-input); transition: background var(--t-fast); }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-fast); }
.switch input:checked + span { background: var(--c-accent); } .switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 6px; }
.icon-choice { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-bg); cursor: pointer; color: var(--c-text); }
.icon-choice[aria-checked="true"] { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent); }

/* ================= Cronograma ================= */
.timeline { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 360px; }
.tl-toolbar { padding: 0 0 var(--s-2); }
.tlv-body { display: flex; flex: 1; min-height: 0; border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; background: var(--c-bg); }
.tlv-left { width: 260px; flex: none; overflow: hidden; border-right: 1px solid var(--c-border); }
.tlv-left-head { height: 52px; display: flex; align-items: flex-end; padding: 0 12px 8px; font-weight: 600; color: var(--c-text-muted); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; background: var(--c-bg); }
.tlv-left-sec { display: flex; align-items: center; padding: 0 12px; font-weight: 700; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.tlv-left-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 12px; border: 0; border-bottom: 1px solid var(--c-border); background: transparent; cursor: pointer; text-align: left; }
.tlv-left-row:hover { background: var(--c-surface); } .tlv-left-row .ellipsis { flex: 1; } .tlv-left-row.is-done { color: var(--c-text-muted); }
.tlv-scroll { flex: 1; overflow: auto; position: relative; }
.tlv-head { position: sticky; top: 0; z-index: 3; height: 52px; background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.tlv-months { position: relative; height: 24px; } .tlv-month { position: absolute; top: 4px; padding-left: 6px; font-weight: 600; font-size: 12px; white-space: nowrap; border-left: 1px solid var(--c-border); }
.tlv-days { position: relative; height: 28px; }
.tlv-day { position: absolute; top: 0; height: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; line-height: 1.1; color: var(--c-text-muted); }
.tlv-day span { font-size: 9px; } .tlv-day.is-weekend { opacity: .65; } .tlv-day.is-today { color: var(--c-accent); font-weight: 700; }
.tlv-week { align-items: flex-start; padding-left: 4px; border-left: 1px solid var(--c-border); }
.tlv-grid { position: relative; }
.tlv-weekend { position: absolute; top: 0; bottom: 0; background: var(--c-surface); }
.tlv-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--c-accent); opacity: .7; z-index: 2; }
.tlv-row { position: absolute; left: 0; right: 0; height: var(--row); border-bottom: 1px solid var(--c-border); }
.tlv-row-sec { background: color-mix(in srgb, var(--c-surface) 70%, transparent); }
.tlv-row.is-empty { cursor: copy; } .tlv-row.is-empty:hover { background: var(--c-accent-soft); }
.tlv-bar { position: absolute; top: 6px; height: calc(var(--row) - 12px); border-radius: 6px; display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; cursor: grab; box-shadow: var(--sh-card); z-index: 1; user-select: none; touch-action: none; }
.tlv-bar.is-dragging { cursor: grabbing; opacity: .85; z-index: 4; } .tlv-bar.is-blocked { outline: 2px dashed var(--c-warning); outline-offset: 1px; }
.tlv-bar:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.tlv-bar-name { pointer-events: none; }
.tlv-handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; } .tlv-h-l { left: 0; } .tlv-h-r { right: 0; }
.tlv-label { position: absolute; top: 0; height: var(--row); display: flex; align-items: center; font-size: 12px; white-space: nowrap; color: var(--c-text-muted); pointer-events: none; }
.tlv-milestone { position: absolute; top: calc(var(--row) / 2 - 9px); width: 18px; height: 18px; transform: rotate(45deg); background: var(--c-accent); border: 0; border-radius: 3px; cursor: grab; z-index: 1; touch-action: none; }
.tlv-milestone.is-done { background: var(--c-text-muted); }
.tlv-deps { position: absolute; inset: 0; pointer-events: none; color: var(--c-text-muted); z-index: 2; overflow: visible; }
.tlv-dep { fill: none; stroke: currentColor; stroke-width: 1.5; } .tlv-dep.is-conflict { stroke: var(--c-danger); color: var(--c-danger); }

/* ================= Painel ================= */
.dash-head { margin-bottom: var(--s-3); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-4); }
.dash-card { margin: 0; min-height: 260px; display: flex; flex-direction: column; }
.dash-card.is-number { min-height: 0; } .dash-card.is-wide { grid-column: span 2; } @media (max-width: 760px) { .dash-card.is-wide { grid-column: auto; } }
.chart-number { font-size: 44px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.chart-bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.chart-bars li { display: grid; grid-template-columns: 120px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.chart-bar-track { height: 14px; background: var(--c-surface-2); border-radius: 4px; overflow: hidden; } .chart-bar { display: block; height: 100%; border-radius: 4px; }
.chart-bars strong { text-align: right; }
.chart-cols { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 12px; overflow-x: auto; }
.chart-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 52px; flex: 1; font-size: 12px; }
.chart-col-bar { width: 70%; max-width: 48px; border-radius: 4px 4px 0 0; } .chart-col-label { max-width: 80px; color: var(--c-text-muted); }
.chart-donut-wrap { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; } .chart-donut { width: 160px; height: 160px; }
.chart-donut-total { font-size: 28px; font-weight: 700; fill: var(--c-text); }
.chart-legend { display: flex; gap: 12px; font-size: 12px; color: var(--c-text-muted); margin-top: 6px; } .chart-legend-col { flex-direction: column; list-style: none; padding: 0; margin: 0; gap: 6px; flex: 1; min-width: 140px; }
.chart-legend-col li { display: flex; gap: 8px; align-items: center; color: var(--c-text); } .chart-legend-col li .ellipsis { flex: 1; }
.leg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.chart-svg { width: 100%; height: auto; } .chart-axis { stroke: var(--c-border); }
.chart-line { fill: none; stroke-width: 2.5; } .chart-line-total { stroke: var(--c-text-muted); stroke-dasharray: 5 4; } .chart-line-done { stroke: var(--c-accent); }
.chart-area { fill: var(--c-accent-soft); } .chart-tick { font-size: 11px; fill: var(--c-text-muted); } .chart-empty { margin-top: 30px; text-align: center; }

/* ================= Fluxo de trabalho / regras ================= */
.wf-head { margin-bottom: var(--s-4); align-items: flex-start; }
.wf-cols { display: flex; gap: var(--s-3); overflow-x: auto; padding-bottom: var(--s-3); }
.wf-col { min-width: 250px; max-width: 280px; flex: none; background: var(--c-surface); border-radius: var(--r-md); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.wf-sub { margin: var(--s-4) 0 var(--s-2); }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-3); }
.rule-card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-3); box-shadow: var(--sh-card); }
.rule-card.is-off { opacity: .6; }
.rule-line { margin: 6px 0 0; font-size: 13px; } .rule-k { display: inline-block; min-width: 46px; font-weight: 700; color: var(--c-accent); margin-right: 4px; }
.rule-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2); }
.rule-tpl { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); cursor: pointer; }
.rule-tpl:hover { border-color: var(--c-accent); } .rule-tpl.is-custom { border-style: dashed; } .rule-tpl .muted { font-size: 12px; }
.rule-builder { display: flex; flex-direction: column; gap: var(--s-3); }
.rb-block { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-3); margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.rb-block legend { font-weight: 700; padding: 0 4px; }
.rb-row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; } .rb-row .input { width: auto; min-width: 160px; flex: 1; }

/* Mensagens do time */
.team-compose { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.team-messages .message { border-top: 1px solid var(--c-border); padding-top: var(--s-3); margin-top: var(--s-3); }
.dash-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-4); }
.dash-nums .dash-card { min-height: 0; }
[data-theme="dark"] .toast { background: #33403d; color: var(--c-text); }
[data-theme="dark"] .toast .icon-btn { color: var(--c-text); }
.wf-head { margin-top: var(--s-3); }

/* ================= Onda 2: gestão ================= */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.card-link { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); color: var(--c-text); text-decoration: none !important; }
.card-link:hover { border-color: var(--c-accent); box-shadow: var(--sh-card); }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: 8px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-bg); }
.data-table th { text-align: left; font-size: 12px; color: var(--c-text-muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; } .data-table a.row { color: var(--c-text); }
.progress-sm { width: 110px; height: 8px; margin: 0; flex: none; } .progress-sm span { height: 100%; }
.pf-timeline { position: relative; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 8px 0; background: var(--c-bg); }
.pf-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; height: 40px; border-bottom: 1px solid var(--c-border); } .pf-row:last-child { border-bottom: 0; }
.pf-name { padding: 0 12px; color: var(--c-text); font-weight: 600; } .pf-track { position: relative; height: 100%; }
.pf-bar { position: absolute; top: 8px; height: 24px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; padding: 0 8px; min-width: 34px; }
.pf-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--c-accent); opacity: .7; }
.goal-summary .progress { flex: 1; }
.goal-list { border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); overflow: hidden; }
.goal-row { display: grid; grid-template-columns: minmax(240px, 1fr) 130px 180px 140px 40px 36px; align-items: center; gap: 8px; min-height: 44px; padding-right: 8px; border-bottom: 1px solid var(--c-border); }
.goal-row:last-child { border-bottom: 0; } .goal-head { font-size: 12px; color: var(--c-text-muted); font-weight: 600; min-height: 34px; padding-left: 12px; background: var(--c-surface); }
.goal-name { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--c-text); min-width: 0; padding: 0; }
.goal-name:hover strong { text-decoration: underline; } .goal-progress { display: flex; align-items: center; gap: 8px; }
@media (max-width: 800px) { .goal-row { grid-template-columns: 1fr 100px 40px; } .goal-row > :nth-child(2), .goal-row > :nth-child(4), .goal-row > :nth-child(6) { display: none; } }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.wl-tools { margin-bottom: var(--s-3); gap: var(--s-3); }
.wl-grid { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); }
.wl-head, .wl-row { display: grid; grid-template-columns: 200px repeat(var(--days), minmax(38px, 1fr)); align-items: stretch; min-width: calc(200px + var(--days) * 38px); }
.wl-head { font-size: 11px; color: var(--c-text-muted); background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.wl-day { text-align: center; padding: 6px 0; } .wl-day.is-today { color: var(--c-accent); font-weight: 700; }
.wl-row { border-bottom: 1px solid var(--c-border); height: 48px; } .wl-row:last-child { border-bottom: 0; }
.wl-person { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0 12px; cursor: pointer; color: var(--c-text); min-width: 0; text-align: left; }
.wl-cell { position: relative; border-left: 1px solid var(--c-border); display: flex; align-items: flex-end; justify-content: center; }
.wl-fill { position: absolute; left: 3px; right: 3px; bottom: 3px; border-radius: 4px; background: var(--c-accent-soft); }
.wl-cell.is-high .wl-fill { background: color-mix(in srgb, var(--c-warning) 30%, transparent); } .wl-cell.is-over .wl-fill { background: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.wl-val { position: relative; font-size: 11px; font-weight: 600; padding-bottom: 6px; } .wl-cell.is-over .wl-val { color: var(--c-danger); }
.forms-panel { margin-top: var(--s-5); }
.form-page { max-width: 680px; margin: 0 auto; } .form-banner { height: 10px; border-radius: var(--r-md) var(--r-md) 0 0; margin: calc(-1 * var(--s-4)) calc(-1 * var(--s-4)) var(--s-4); }
.public-form { margin-top: var(--s-4); }
.task-id { font-family: var(--mono); font-size: 11px; background: var(--c-surface-2); border-radius: 4px; color: var(--c-text-muted); }
.task-id-line { margin-bottom: 4px; }
.time-prop { flex-wrap: wrap; gap: 4px; } .time-log { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.time-list { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: auto; } .time-list li { padding: 4px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.view-content > .goal-summary:first-child, .view-content > .table-wrap:first-child, .view-content > .card-grid:first-child, .view-content > .goal-list:first-child, .view-content > .wl-tools:first-child, .view-content > .pf-timeline:first-child, .view-content > .dash-head:first-child { margin-top: var(--s-4); }

/* ================= Onda 3 ================= */
.tlv-left.is-gantt { width: 430px; }
.tlv-left-head { gap: 8px; } .tlv-left-head .gc { font-size: 11px; }
.gc { flex: none; width: 46px; text-align: right; font-size: 12px; color: var(--c-text-muted); } .gc-s { width: 34px; }
.tlv-bar.is-critical { box-shadow: 0 0 0 2px var(--c-danger); } .tlv-dep.is-critical { stroke: var(--c-danger); stroke-width: 2.25; color: var(--c-danger); }
.reactions { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.reaction { border: 1px solid var(--c-border); background: var(--c-bg); border-radius: 999px; padding: 0 8px; height: 24px; font-size: 13px; cursor: pointer; }
.reaction.is-mine { border-color: var(--c-accent); background: var(--c-accent-soft); }
.emoji-pick { display: flex; gap: 2px; padding: 6px; } .emoji { border: 0; background: transparent; font-size: 20px; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; } .emoji:hover { background: var(--c-surface-2); }
.audit-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; } .audit-list li { padding: 6px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.milestones { list-style: none; margin: 0; padding: 0; } .milestones li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--c-border); }
.milestones li:last-child { border-bottom: 0; } .milestones li.is-done a { text-decoration: line-through; color: var(--c-text-muted); } .milestones svg { color: var(--c-accent); }
.note-page { max-width: 860px; } .note-page .rich-view { min-height: 300px; border: 1px solid var(--c-border); background: var(--c-bg); padding: var(--s-4); }
.notepad { resize: vertical; min-height: 140px; } .home-tools { margin-bottom: -8px; } .home-goal { padding: 6px 0; border-bottom: 1px solid var(--c-border); }
.api-doc { margin-top: var(--s-3); } .api-doc summary { cursor: pointer; font-weight: 600; } .mono { font-family: var(--mono); font-size: 13px; }
.verify-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 10px; margin-right: 8px; border-radius: var(--r-pill); background: var(--c-accent-soft); color: var(--c-text); font-size: 13px; white-space: nowrap; }
.verify-chip .btn { height: 26px; color: var(--c-accent); } @media (max-width: 700px) { .verify-text { display: none; } }
.tl-parent { flex: none; max-width: 40%; font-size: 12px; color: var(--c-text-muted); margin-right: 4px; text-decoration: none; }
.tl-parent:hover { color: var(--c-accent); text-decoration: underline; }
.google-btn { gap: 10px; } .g-mark { font-weight: 800; color: #4285f4; font-size: 16px; }
.auth-or { display: flex; align-items: center; gap: 8px; color: var(--c-text-muted); font-size: 12px; margin: 12px 0; } .auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.att-thumb { border: 0; padding: 0; background: transparent; cursor: zoom-in; display: block; } .att-thumb img { display: block; }
.proof-stage { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; border: 1px solid var(--c-border); border-radius: var(--r-sm); }
.proof-stage img { display: block; max-width: 100%; max-height: 60vh; user-select: none; }
.proof-pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: var(--c-danger); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; pointer-events: auto; }
.proof-list { margin: 12px 0 0; padding-left: 22px; font-size: 13px; } .proof-list li { margin-bottom: 6px; }
.proof-ref { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--c-surface-2); border-radius: 4px; font-size: 12px; padding: 2px 6px; cursor: pointer; margin-bottom: 4px; }

/* ================= Layout: acabamento (sessão de layout) ================= */
/* Cabeçalho de página numa linha só: o título encolhe com reticências, as ações não descem. */
.page-head { container-type: inline-size; container-name: head; }
.page-title-row { flex-wrap: nowrap; min-width: 0; }
.page-title-row > * { flex-shrink: 0; }
.page-title-row .page-title, .page-title-row .page-title-input { flex: 0 1 auto; min-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container head (max-width: 720px) { .page-title-row .avatars { display: none; } }
@container head (max-width: 560px) { .page-title-row .status-pill, .page-title-row .btn-ghost { display: none; } }

/* Abas e barra de filtros: rolam para o lado em vez de quebrar em várias linhas. */
.tabs, .toolbar { scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar, .toolbar::-webkit-scrollbar { display: none; }
.tabs.has-more-end, .toolbar.has-more-end { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tabs.has-more-start, .toolbar.has-more-start { mask-image: linear-gradient(to right, transparent, #000 48px); }
.tabs.has-more-start.has-more-end, .toolbar.has-more-start.has-more-end { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.toolbar { flex-wrap: nowrap; overflow-x: auto; }
.toolbar > * { flex-shrink: 0; }

/* Painel da tarefa: até 1366px ele fica por cima da lista, para a lista não ser espremida. */
@media (max-width: 1366px) {
  .task-pane:not(.is-full) { position: fixed; top: var(--l-topbar); right: 0; bottom: 0; width: min(100%, var(--l-detail-pane)); z-index: 25; }
}
.props dt { align-self: start; padding-top: 6px; }
.props .chips { gap: 8px; }
.props .proj-chip { height: 30px; padding: 0 4px 0 10px; max-width: 100%; white-space: nowrap; }
.props .proj-chip a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.props .proj-chip a .dot { flex: none; }
.props .proj-chip .mini-select { flex: none; max-width: 140px; }
.props .proj-chip .icon-btn { margin-left: -2px; }
.time-prop { gap: 8px; } .time-prop .cell-btn { width: auto; }

/* Avisos: canto inferior esquerdo (como no Asana), no máximo 3 por vez. */
#toasts { left: calc(var(--l-sidebar) + 24px); transform: none; align-items: flex-start; }
@media (max-width: 900px) { #toasts { left: 16px; right: 16px; } #toasts .toast { min-width: 0; width: 100%; } }
/* Colunas configuráveis da lista (estilo Asana) */
.th-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 26px; padding: 0 6px; margin-left: -6px; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.th-btn:hover, .th-btn:focus-visible { background: var(--c-hover, rgba(0,0,0,.05)); }
.th-btn svg { opacity: 0; flex: none; }
.tl-head .tl-cell:hover .th-btn svg, .th-btn:focus-visible svg { opacity: .7; }
.tl-head .tl-name .grow { flex: 1; }
.tl-cols-btn { opacity: .6; }
.tl-cols-btn:hover { opacity: 1; }

/* Caixa de entrada: densidade e resumo de atrasadas */
.inbox-list.is-compact .inbox-item { padding-top: 6px; padding-bottom: 6px; }
.inbox-list.is-compact .inbox-quote, .inbox-list.is-compact .inbox-item .avatar { display: none; }
.inbox-digest:empty { display: none; }
.digest-card { border: 1px solid var(--c-border); border-radius: var(--r-md, 8px); padding: 12px 16px; margin: 0 0 16px; background: var(--c-bg); }
.digest-card h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 8px; }
.digest-list { display: flex; flex-direction: column; }
.digest-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid var(--c-border); color: inherit; text-decoration: none; }
.digest-row:hover { background: var(--c-hover, rgba(0,0,0,.04)); }
.home-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.week-pick select { font-weight: 600; }
a.person { color: inherit; text-decoration: none; }

/* Páginas (documentos) */
.page-doc { max-width: 820px; margin: 0 auto; padding: 16px 24px 64px; }
.page-doc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.page-doc-title { width: 100%; border: 0; resize: none; overflow: hidden; background: transparent; color: var(--c-text); font-size: 32px; font-weight: 700; line-height: 1.25; padding: 4px 0; font-family: inherit; }
.page-doc-title:focus { outline: none; }
.page-doc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 20px; }
.page-doc .rich-view { min-height: 240px; font-size: 15px; line-height: 1.6; }
.page-doc-comments { margin-top: 40px; border-top: 1px solid var(--c-border); padding-top: 16px; }
.small-title { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.kn-pages .page-head { display: none; }
/* Tabelas */
.kt th, .kt td { padding: 4px 8px; }
.kt-input { width: 100%; min-width: 120px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; padding: 4px 6px; color: inherit; font: inherit; }
.kt-input:hover:not([readonly]) { border-color: var(--c-border); }
.kt-input:focus { outline: 2px solid var(--c-focus); background: var(--c-bg); }
.kt-name { font-weight: 600; min-width: 180px; }
/* Planilhas de horas */
.ts-tools { flex-wrap: wrap; }
.ts-grid .num, .data-table .num { text-align: right; white-space: nowrap; }
.ts-grid th.is-today { color: var(--c-accent); }
.ts-grid tfoot th { border-top: 1px solid var(--c-border); }
/* Perfil */
.profile { max-width: 1100px; margin: 0 auto; padding: 24px; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.profile-head .page-title { margin: 0 0 4px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.profile-about { white-space: pre-wrap; max-width: 640px; }
.profile-head .banner { margin: 8px 0; }
.tab-add { align-self: center; margin-left: 4px; flex: none; }

/* Acabamento — rodada 2 (sessão de layout) */
/* Anotações do projeto: respiro abaixo das abas. */
.view-content > .note-page:first-child { padding-top: var(--s-4); }
/* Painel: títulos dos cartões quebram em até 2 linhas em vez de cortar com reticências. */
.dash-card h2.ellipsis { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
/* Cabeçalho de página estreito (celular): as ações descem para a linha de baixo em vez de sair da tela. */
@container head (max-width: 560px) {
  .page-title-row:has(> h1.page-title) { flex-wrap: wrap; row-gap: var(--s-2); }
  .page-title-row > h1.page-title { flex: 1 1 auto; }
}

/* Barras de rolagem finas e discretas em todo o app (no lugar da barra cinza com setas do Windows). */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--c-text) 22%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--c-text) 20%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--c-text) 38%, transparent); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* Menu lateral: a barra só aparece quando o mouse está sobre ele. */
.sidebar { scrollbar-color: transparent transparent; scrollbar-gutter: stable; }
.sidebar:hover, .sidebar:focus-within { scrollbar-color: color-mix(in srgb, var(--c-text) 22%, transparent) transparent; }
.sidebar::-webkit-scrollbar-thumb { background-color: transparent; }
.sidebar:hover::-webkit-scrollbar-thumb, .sidebar:focus-within::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--c-text) 20%, transparent); }
