/* ============================================================
   PHI Gestão — identidade visual Asana + cores PHI
   ============================================================ */

:root {
  --phi-purple:        #5C1A5E;
  --phi-purple-dark:   #421443;
  --phi-purple-light:  #7E3B81;
  --phi-purple-50:     #F5EDF6;
  --phi-purple-10:     #FBF8FC;

  --asana-bg:          #FFFFFF;
  --asana-bg-soft:     #FAFBFC;
  --asana-border:      #EDEAE9;
  --asana-border-soft: #F4F2F1;
  --asana-text:        #1E1F21;
  --asana-text-2:      #44464A;
  --asana-muted:       #6B6F76;
  --asana-hover:       #F5F4F3;
}

/* Override Bootstrap primary */
:root,
[data-bs-theme="light"] {
  --bs-primary:        var(--phi-purple);
  --bs-primary-rgb:    92, 26, 94;
  --bs-link-color:     var(--phi-purple);
  --bs-link-hover-color: var(--phi-purple-dark);
  --bs-border-color:   var(--asana-border);
}

/* ---- Base ---- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--asana-bg);
  color: var(--asana-text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
a { text-decoration: none; }

/* ---- Top Bar (navbar Asana) ---- */
.topbar {
  background: var(--asana-bg);
  border-bottom: 1px solid var(--asana-border);
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--phi-purple);
  font-size: 1.05rem;
}
.topbar-brand img { height: 28px; }
.topbar-search {
  flex: 1;
  max-width: 600px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  border: 1px solid var(--asana-border);
  background: var(--asana-bg-soft);
  border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 2.25rem;
  font-size: 0.875rem;
}
.topbar-search input:focus {
  outline: none;
  border-color: var(--phi-purple-light);
  background: #fff;
}
.topbar-search i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--asana-muted);
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* ---- Avatar circles ---- */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: var(--phi-purple-light);
  text-transform: uppercase;
}
.avatar-stack {
  display: inline-flex;
}
.avatar-stack .avatar {
  margin-left: -8px;
  border: 2px solid #fff;
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---- Project Header (Asana style) ---- */
.project-header {
  padding: 1.25rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--asana-border-soft);
  background: var(--asana-bg);
}
.project-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.project-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--phi-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.project-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--asana-text);
  margin: 0;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--asana-muted);
  font-size: 0.85rem;
}
.btn-asana {
  background: transparent;
  border: 1px solid var(--asana-border);
  color: var(--asana-text-2);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s;
}
.btn-asana:hover {
  background: var(--asana-hover);
  color: var(--asana-text);
}
.btn-asana-primary {
  background: var(--phi-purple);
  color: #fff;
  border-color: var(--phi-purple);
}
.btn-asana-primary:hover {
  background: var(--phi-purple-dark);
  border-color: var(--phi-purple-dark);
  color: #fff;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--asana-border);
  border-radius: 999px;
  background: var(--asana-bg-soft);
  font-size: 0.8rem;
  color: var(--asana-muted);
  cursor: pointer;
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--asana-muted);
}

/* ---- Tabs Asana ---- */
.tabs-asana {
  display: flex;
  gap: 1.25rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--asana-border);
  background: var(--asana-bg);
}
.tabs-asana a {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--asana-muted);
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: -1px;
}
.tabs-asana a:hover {
  color: var(--asana-text);
}
.tabs-asana a.active {
  color: var(--asana-text);
  border-bottom-color: var(--phi-purple);
  font-weight: 600;
}

/* ---- Toolbar ---- */
.toolbar-asana {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--asana-bg);
  border-bottom: 1px solid var(--asana-border-soft);
}
.toolbar-asana .spacer { flex: 1; }

/* ---- Content area ---- */
.workspace {
  padding: 0;
}

/* ---- Lista (Asana density) ---- */
.list-wrap {
  background: #fff;
}


.section-row {
  padding: 0.85rem 1.5rem 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--asana-text);
  cursor: pointer;
}
.section-row .chevron { font-size: 0.7rem; color: var(--asana-muted); }

.add-task-row, .add-section-row {
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--asana-muted);
  cursor: pointer;
}
.add-task-row:hover, .add-section-row:hover { color: var(--asana-text); }
.add-section-row { padding: 0.85rem 1.5rem 1.5rem; }

/* ---- Pills (status/priority/phase Asana style) ---- */
.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
}
.pill-on-track  { background: #C9F2EA; color: #146B58; }
.pill-at-risk   { background: #FFE7B2; color: #946100; }
.pill-off-track { background: #FFD0CC; color: #A11A09; }
.pill-paused    { background: #E4E4E4; color: #4A4A4A; }
.pill-done      { background: #C9F2EA; color: #146B58; }
.pill-high      { background: #FFD0CC; color: #A11A09; }
.pill-medium    { background: #FFE7B2; color: #946100; }
.pill-low       { background: #D6E8C9; color: #34662F; }
.pill-mvp          { background: #FFE7B2; color: #946100; }
.pill-in-progress  { background: #E4E4E4; color: #4A4A4A; }
.pill-discovery    { background: #E4E4E4; color: #4A4A4A; }
.pill-validation   { background: #D8E0F4; color: #2B3D74; }
.pill-production   { background: #C9F2EA; color: #146B58; }

/* ---- Card (Quadro) ---- */
.card {
  border: 1px solid var(--asana-border);
  border-radius: 8px;
  background: #fff;
}

/* ============================================================
   Board (Quadro Kanban)
   ============================================================ */
.board-scroll {
  overflow-x: auto;
  padding-bottom: 1rem;
}
.board-grid {
  display: flex;
  gap: 1rem;
  min-height: 60vh;
}
.board-column {
  flex: 0 0 290px;
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
}
.board-column-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--asana-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--asana-bg-soft);
  border-radius: 10px 10px 0 0;
}
.board-column-header .title {
  font-weight: 600;
  color: var(--asana-text);
  font-size: 0.9rem;
}
.board-column-body {
  padding: 0.75rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.board-card {
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 8px;
  padding: 0.85rem;
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
  user-select: none;
}
.board-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: var(--phi-purple-light);
}
.board-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}
.board-card-placeholder {
  border: 2px dashed var(--phi-purple-light);
  border-radius: 8px;
  background: var(--phi-purple-10);
  min-height: 52px;
}
.board-column-body.drag-over {
  background: var(--phi-purple-10);
  border-radius: 0 0 10px 10px;
}

/* Drag de colunas */
.board-column-header {
  cursor: grab;
}
.board-column-header:active {
  cursor: grabbing;
}
.col-drag-handle {
  color: var(--asana-muted);
  margin-right: 0.35rem;
  font-size: 0.85rem;
  opacity: 0.5;
}
.board-column-header:hover .col-drag-handle {
  opacity: 1;
}
.board-column.col-dragging {
  opacity: 0.35;
}
.board-column-placeholder {
  flex: 0 0 auto;
  min-height: 120px;
  border: 2px dashed var(--phi-purple-light);
  border-radius: 10px;
  background: var(--phi-purple-10);
}
.board-card-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.board-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--asana-muted);
  font-size: 0.75rem;
  margin-top: 0.6rem;
}
.board-empty {
  text-align: center;
  color: var(--asana-muted);
  font-size: 0.85rem;
  font-style: italic;
  padding: 1rem 0.5rem;
}

/* ============================================================
   Cronograma (Frappe Gantt overrides)
   ============================================================ */
#gantt-container {
  overflow-x: auto;
}
.gantt .bar {
  fill: var(--phi-purple-light) !important;
  stroke: var(--phi-purple) !important;
}
.gantt .bar-progress {
  fill: var(--phi-purple) !important;
}
.gantt .bar-wrapper:hover .bar {
  fill: var(--phi-purple) !important;
  filter: brightness(0.95);
}
.gantt .grid-header {
  fill: var(--phi-purple-50) !important;
}
.gantt .today-highlight {
  fill: var(--phi-purple-50) !important;
}
.gantt .bar-label {
  fill: #fff;
  font-weight: 500;
}
.gantt .bar-label.big {
  fill: var(--asana-text);
}

/* ============================================================
   Botão Asana — estado active (para botões de view mode)
   ============================================================ */
.btn-asana.active {
  background: var(--phi-purple);
  color: #fff;
  border-color: var(--phi-purple);
}
.btn-asana.active:hover {
  background: var(--phi-purple-dark);
  color: #fff;
}

/* ============================================================
   Células editáveis (dropdown estilo Asana)
   ============================================================ */
.cell-editable {
  position: relative;
  cursor: pointer;
  padding: 0.15rem 1.2rem 0.15rem 0.3rem;
  border-radius: 4px;
  min-height: 22px;
  transition: background 0.1s;
}
.cell-editable:hover {
  background: var(--asana-bg-soft);
  outline: 1px solid var(--asana-border);
}
.cell-editable:hover::after {
  content: "▾";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--asana-muted);
  font-size: 0.65rem;
  pointer-events: none;
}

.pill-dropdown {
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.35rem 0;
  min-width: 200px;
  position: absolute;
  z-index: 1000;
}
.pill-dropdown-item {
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pill-dropdown-item:hover {
  background: var(--asana-hover);
}
.pill-dropdown-check {
  display: inline-block;
  width: 14px;
  color: var(--phi-purple);
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.pill-dropdown-sep {
  border-top: 1px solid var(--asana-border-soft);
  margin: 0.3rem 0;
}
.pill-dropdown-edit {
  color: var(--asana-muted);
  font-size: 0.8rem;
}
.pill-dropdown-edit:hover {
  color: var(--asana-text);
  background: var(--asana-hover);
}

/* ============================================================
   Toggle de subtarefas
   ============================================================ */
.task-toggle {
  cursor: pointer;
  color: var(--asana-muted);
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.task-toggle:hover { color: var(--asana-text); }
.task-toggle.collapsed { transform: rotate(-90deg); }
.task-toggle-placeholder {
  display: inline-block;
  width: 14px;
}
.task-row.subtask.hidden { display: none; }

/* ============================================================
   Texto editável inline (nome, próxima ação)
   ============================================================ */
.task-name {
  cursor: text;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.task-name:hover {
  background: var(--asana-bg-soft);
}

.next-action-editable {
  cursor: text;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-height: 22px;
  color: var(--asana-text-2);
}
.next-action-editable:hover {
  background: var(--asana-bg-soft);
  outline: 1px solid var(--asana-border);
}
.next-action-editable:empty::before {
  content: "—";
  color: var(--asana-muted);
}

.inline-edit-input {
  border: none;
  outline: none;
  background: #fff;
  width: 100%;
  font-size: inherit;
  font-family: inherit;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--phi-purple-light);
}

/* ============================================================
   Data editável inline
   ============================================================ */
.cell-editable-date {
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-height: 22px;
  color: var(--asana-text-2);
}
.cell-editable-date:hover {
  background: var(--asana-bg-soft);
  outline: 1px solid var(--asana-border);
}
.cell-editable-date:empty::before {
  content: "—";
  color: var(--asana-muted);
}
.inline-edit-input[type="date"] {
  width: 100%;
  font-size: 0.875rem;
}

/* ============================================================
   Date picker popup (estilo Asana)
   ============================================================ */
.date-popup {
  position: absolute;
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  padding: 0.85rem;
  z-index: 1000;
  min-width: 300px;
}
.date-popup-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.date-popup-tab {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--asana-border);
  background: #fff;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--asana-text-2);
  cursor: pointer;
  text-align: center;
}
.date-popup-tab:hover {
  background: var(--asana-hover);
}
.date-popup-tab.active {
  background: var(--phi-purple-50);
  border-color: var(--phi-purple);
  color: var(--phi-purple);
  font-weight: 500;
}
.date-popup-calendar .flatpickr-calendar {
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
}
.date-popup-footer {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--asana-border-soft);
}
.date-popup-clear {
  border: none;
  background: transparent;
  color: var(--asana-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.date-popup-clear:hover {
  color: var(--asana-text);
}

/* ============================================================
   Célula de responsável (clicável)
   ============================================================ */
.cell-assignee {
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cell-assignee:hover {
  background: var(--asana-bg-soft);
  outline: 1px solid var(--asana-border);
}
.cell-assignee:empty::before {
  content: "—";
  color: var(--asana-muted);
}

/* ============================================================
   Botão de deletar tarefa (aparece no hover da linha)
   ============================================================ */
.task-row { position: relative; }
.task-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.task-row:hover .task-actions {
  opacity: 1;
  pointer-events: auto;
}
.task-delete {
  background: transparent;
  border: none;
  color: var(--asana-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.task-delete:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

/* ============================================================
   Seções editáveis e collapse
   ============================================================ */
.section-row { position: relative; }
.section-row .chevron {
  transition: transform 0.15s;
}
.section-row.collapsed .chevron {
  transform: rotate(-90deg);
}

.section-name {
  cursor: text;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.section-name:hover {
  background: var(--asana-bg-soft);
}

.section-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.section-row:hover .section-actions {
  opacity: 1;
  pointer-events: auto;
}
.section-delete {
  background: transparent;
  border: none;
  color: var(--asana-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}
.section-delete:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

.section-row-new {
  background: var(--asana-bg-soft);
}
.section-row-new input {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ============================================================
   Tabela de tarefas — layout estilo Asana com colunas resizable
   ============================================================ */
.list-wrap {
  --col-widths: minmax(320px, 2.5fr) 150px 160px 110px 110px 130px minmax(180px, 1.5fr);
  overflow-x: auto;
}

.list-header,
.task-row {
  display: grid;
  grid-template-columns: var(--col-widths);
  min-height: 40px;
  align-items: center;
  border-bottom: 1px solid var(--asana-border-soft);
  position: relative;
}

.list-header {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--asana-muted);
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 36px;
}

.list-header > div,
.task-row > div {
  padding: 0 0.7rem;
  border-right: 1px solid var(--asana-border-soft);
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.list-header > div:last-child,
.task-row > div:last-child {
  border-right: none;
}

/* Coluna Nome: alinhamento + truncate */
.task-row .name {
  gap: 0.35rem;
}
.task-row .name .task-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Cells flexam dentro da célula-grid pai */
.cell-assignee,
.cell-editable,
.cell-editable-date,
.next-action-editable {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-assignee {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cell-assignee > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Hover sutil em toda a linha */
.task-row:hover {
  background: var(--asana-hover, #f6f6f7);
}

/* ============================================================
   Handle de redimensionar colunas
   ============================================================ */
.col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  background: transparent;
  z-index: 6;
}
.col-resize-handle:hover {
  background: var(--phi-purple-light, #c9a8d3);
}
body.col-resizing {
  cursor: col-resize !important;
  user-select: none;
}
body.col-resizing .col-resize-handle {
  background: var(--phi-purple, #5C1A5E);
}

/* ============================================================
   Home — Cards de projetos
   ============================================================ */
.home-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.project-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 10px;
  transition: all 0.15s;
  height: 100%;
  color: inherit;
}
.project-card:hover {
  border-color: var(--phi-purple);
  box-shadow: 0 4px 12px rgba(92, 26, 94, 0.1);
  transform: translateY(-1px);
}
.project-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--phi-purple-50, #f3e8f7);
  color: var(--phi-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.project-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--asana-text);
}
.project-card-meta {
  font-size: 0.8rem;
  color: var(--asana-muted);
  margin-top: 0.15rem;
}

/* ============================================================
   Drawer de detalhes da tarefa
   ============================================================ */
.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 540px;
  max-width: 100vw;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.task-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--asana-border-soft);
  flex-shrink: 0;
}

.btn-toggle-complete {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--asana-border);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--asana-text-2);
}
.btn-toggle-complete:hover {
  background: var(--asana-bg-soft);
}
.btn-toggle-complete.is-completed {
  background: #e8f5ec;
  border-color: #2db14a;
  color: #1c7a32;
}
.btn-toggle-complete.is-completed i {
  color: #2db14a;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  color: var(--asana-muted);
  font-size: 1.05rem;
}
.btn-icon:hover {
  background: var(--asana-bg-soft);
  color: var(--asana-text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
}

.drawer-task-name {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 600;
  border: 1px solid transparent;
  outline: none;
  padding: 0.4rem 0.5rem;
  margin: 0 -0.5rem 1.25rem;
  color: var(--asana-text);
  background: transparent;
  border-radius: 6px;
}
.drawer-task-name:hover {
  background: var(--asana-bg-soft);
}
.drawer-task-name:focus {
  background: #fff;
  border-color: var(--phi-purple);
}

.drawer-fields {
  width: 100%;
  margin-bottom: 1rem;
}
.drawer-fields td {
  padding: 0.35rem 0;
  vertical-align: top;
  font-size: 0.875rem;
}
.drawer-field-label {
  color: var(--asana-muted);
  width: 140px;
  white-space: nowrap;
  padding-top: 0.4rem !important;
}
.drawer-field-label i {
  margin-right: 0.35rem;
}
.drawer-field-value {
  color: var(--asana-text);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.drawer-field-value:hover {
  background: var(--asana-bg-soft);
}

.drawer-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--asana-border-soft);
}
.drawer-section h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--asana-muted);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-description {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  background: transparent;
  color: var(--asana-text);
}
.drawer-description:hover {
  background: var(--asana-bg-soft);
}
.drawer-description:focus {
  outline: none;
  border-color: var(--phi-purple);
  background: #fff;
}

.drawer-subtask-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}
.drawer-subtask-item:hover {
  background: var(--asana-bg-soft);
}

/* ---- Markdown content ---- */
.md-content {
  font-size: 0.875rem;
  line-height: 1.6;
}
.md-content p { margin-bottom: 0.5rem; }
.md-content p:last-child { margin-bottom: 0; }
.md-content code {
  background: var(--asana-bg-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: monospace;
}
.md-content pre {
  background: var(--asana-bg-soft);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.82rem;
}
.md-content pre code { background: none; padding: 0; }
.md-content ul, .md-content ol { padding-left: 1.5rem; margin-bottom: 0.5rem; }
.md-content blockquote {
  border-left: 3px solid var(--asana-border-soft);
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.75rem;
  color: var(--asana-muted);
}
.md-content h1, .md-content h2, .md-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.75rem 0 0.3rem;
}

/* ---- Description preview (MD preview + click-to-edit) ---- */
.drawer-desc-preview {
  min-height: 36px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: text;
  color: var(--asana-text);
  border: 1px solid transparent;
}
.drawer-desc-preview:hover {
  background: var(--asana-bg-soft);
  border-color: var(--asana-border-soft);
}
.drawer-desc-preview:empty::before {
  content: "Clique para adicionar descrição…";
  color: var(--asana-muted);
  font-size: 0.875rem;
}

/* ---- Markdown hint ---- */
.md-hint {
  font-size: 0.72rem;
  color: var(--asana-muted);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- Activity timeline ---- */
.drawer-activity {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.activity-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.activity-avatar {
  width: 26px !important;
  height: 26px !important;
  font-size: 0.62rem !important;
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-body {
  flex: 1;
  min-width: 0;
}
.activity-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  font-size: 0.83rem;
}
.activity-time {
  font-size: 0.72rem;
  color: var(--asana-muted);
}
.activity-comment-body {
  background: var(--asana-bg-soft);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
}
.activity-history .activity-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  padding-top: 2px;
  font-size: 0.82rem;
  color: var(--asana-muted);
}
.activity-history-text { flex: 1; min-width: 0; }

/* ---- Comment box ---- */
.drawer-comment-box {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.comment-avatar {
  width: 26px !important;
  height: 26px !important;
  font-size: 0.62rem !important;
  flex-shrink: 0;
  margin-top: 4px;
}
.comment-input-wrap { flex: 1; min-width: 0; }
.comment-textarea {
  width: 100%;
  border: 1px solid var(--asana-border-soft);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 34px;
  background: transparent;
  color: var(--asana-text);
  transition: border-color 0.15s, min-height 0.15s;
}
.comment-textarea:focus {
  outline: none;
  border-color: var(--phi-purple);
  background: #fff;
  min-height: 76px;
}
.comment-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

/* ---- Comment edit button ---- */
.comment-edit-btn {
  background: none;
  border: none;
  padding: 0 0.2rem;
  color: var(--asana-muted);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
  margin-left: 0.15rem;
}
.activity-item:hover .comment-edit-btn { opacity: 1; }
.comment-edit-btn:hover { color: var(--phi-purple); }

/* ---- Comment edit area ---- */
.comment-edit-area { margin-top: 0.35rem; }
.comment-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.task-row.active {
  background: var(--phi-purple-50, #f3e8f7) !important;
}
.task-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--phi-purple);
}

.phi-purple-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--phi-purple-50, #f3e8f7);
  color: var(--phi-purple);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ============================================================
   Hierarquia visual: Section > Task > Subtask
   ============================================================ */

/* --- Coluna Nome: layout interno --- */
.task-row .name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Elementos do início da linha não podem encolher */
.task-row .name .check,
.task-row .name .task-toggle,
.task-row .name .task-toggle-placeholder,
.task-row .name .subtask-count {
  flex-shrink: 0;
}

/* --- Check circle (botão de concluído) --- */
.check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c6c6c8;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
  color: transparent;
  font-size: 0.7rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.check:hover {
  border-color: var(--phi-purple);
}
.check.done {
  background: #2db14a;
  border-color: #2db14a;
  color: #fff;
}

/* --- Chevron de expandir/recolher subtarefas --- */
.task-toggle,
.task-toggle-placeholder {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--asana-muted);
  font-size: 0.85rem;
}
.task-toggle-placeholder {
  cursor: default;
  visibility: hidden;
}

/* --- Indentação das subtarefas --- */
.task-row.subtask .name {
  padding-left: 30px;
}

/* Linha sutil ligando subtarefa ao pai */
.task-row.subtask .name::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--asana-border-soft);
}
.task-row.subtask .name {
  position: relative;
}

/* --- Section row --- */
.section-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.7rem 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--asana-text);
  border-bottom: 1px solid var(--asana-border-soft);
  background: #fff;
}
.section-row .chevron {
  cursor: pointer;
  color: var(--asana-text-2);
  transition: transform 0.15s;
  font-size: 0.9rem;
}
.section-row.collapsed .chevron {
  transform: rotate(-90deg);
}

/* --- Botão "Adicionar tarefa..." --- */
.add-task-row {
  padding: 0.5rem 0.7rem 0.5rem 38px;
  color: var(--asana-muted);
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--asana-border-soft);
}
.add-task-row:hover {
  background: var(--asana-bg-soft);
  color: var(--asana-text);
}

/* --- Botão "Adicionar uma seção" --- */
.add-section-row {
  padding: 0.75rem 0.7rem;
  color: var(--asana-muted);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}
.add-section-row:hover {
  background: var(--asana-bg-soft);
  color: var(--phi-purple);
}

/* Estilo da subtarefa um pouco mais leve (cor + tamanho) */
.task-row.subtask .task-name {
  font-size: 0.875rem;
  color: var(--asana-text-2, #424345);
}

/* ============================================================
   CORREÇÃO: tirar .task-actions e .section-actions do grid
   (eles devem flutuar absolutamente sobre a linha)
   ============================================================ */
.task-row > .task-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  border-right: none;
  height: auto;
  display: flex;
  align-items: center;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 3;
  background: transparent;
}
.task-row:hover > .task-actions {
  opacity: 1;
  pointer-events: auto;
}

.section-row > .section-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.section-row:hover > .section-actions {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Toolbar — menus de Filtrar/Ordenar/Agrupar
   ============================================================ */
.project-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--asana-border-soft);
}
.toolbar-spacer {
  flex: 1;
}
.project-toolbar .btn-light {
  background: transparent;
  border: 1px solid transparent;
  color: var(--asana-text-2);
  font-size: 0.85rem;
}
.project-toolbar .btn-light:hover {
  background: var(--asana-bg-soft);
  border-color: var(--asana-border);
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--phi-purple);
  color: #fff;
  border-radius: 10px;
  font-size: 0.65rem;
  padding: 0.05rem 0.4rem;
  margin-left: 0.3rem;
  min-width: 16px;
  font-weight: 600;
}

.toolbar-menu {
  position: absolute;
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.4rem 0;
  z-index: 1000;
  min-width: 220px;
}
.toolbar-menu hr {
  margin: 0.3rem 0;
  border-top: 1px solid var(--asana-border-soft);
}
.toolbar-menu-item {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--asana-text);
}
.toolbar-menu-item:hover {
  background: var(--asana-bg-soft);
}
.toolbar-menu-item.active {
  color: var(--phi-purple);
  font-weight: 500;
}
.toolbar-menu-item.active i.bi-check {
  margin-left: auto;
}

/* Group header (estilo igual section-row, mas levemente diferente) */
.group-row {
  background: #fafafa !important;
}
.group-row .group-key-pill {
  margin-right: 0.4rem;
}

/* ============================================================
   Z-index: garantir que dropdowns abram ACIMA do drawer
   ============================================================ */
.pill-dropdown,
.date-popup,
.toolbar-menu {
  z-index: 1100 !important;
}

/* Feedback visual de "clicável" nos campos do drawer */
.drawer-field-value {
  cursor: pointer;
}
.drawer-field-value:hover {
  outline: 1px solid var(--asana-border);
}

/* ============================================================
   Toasts (substituem alert)
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast-item {
  background: #2c2c2e;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  min-width: 240px;
  max-width: 420px;
  font-size: 0.875rem;
  pointer-events: auto;
  animation: toast-in 0.25s ease;
}
.toast-item.toast-success { background: #1c7a32; }
.toast-item.toast-error   { background: #b3261e; }
.toast-item.toast-info    { background: var(--phi-purple, #5C1A5E); }
.toast-item.toast-fade-out { animation: toast-out 0.25s ease forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to   { opacity: 0; transform: translateX(20px); } }

/* ============================================================
   Animação de remoção de linha
   ============================================================ */
.task-row.removing,
.section-row.removing,
.add-task-row.removing {
  animation: row-fade-out 0.25s ease forwards;
  pointer-events: none;
}
@keyframes row-fade-out {
  to { opacity: 0; transform: translateX(-12px); }
}

/* ============================================================
   Botões em loading state
   ============================================================ */
.btn.loading,
button.loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* ============================================================
   Botão "Adicionar subtarefa" no drawer
   ============================================================ */
.drawer-add-subtask {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  margin-top: 0.4rem;
  color: var(--asana-muted);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
}
.drawer-add-subtask:hover {
  background: var(--asana-bg-soft);
  color: var(--asana-text);
}
.drawer-add-subtask input {
  border: none;
  outline: none;
  padding: 0.2rem 0.3rem;
  font-size: 0.875rem;
  width: 100%;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--phi-purple-light, #c9a8d3);
}

/* ============================================================
   Cronograma (Timeline) — estilo Asana
   ============================================================ */
.timeline-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 230px);
  background: #fff;
  overflow: hidden;
}

.timeline-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--asana-border-soft);
  font-size: 0.875rem;
}
.timeline-nav {
  display: flex; align-items: center; gap: 0.2rem;
}
.timeline-nav button,
.timeline-zoom button {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--asana-text);
}
.timeline-nav button:hover,
.timeline-zoom button:hover {
  background: var(--asana-bg-soft);
  border-color: var(--asana-border);
}
.timeline-spacer { flex: 1; }
.timeline-no-date {
  padding: 0.3rem 0.7rem;
  background: var(--asana-bg-soft);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--asana-text-2);
}
.timeline-zoom {
  display: flex; align-items: center; gap: 0.3rem;
}

/* Grid principal */
.timeline-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
  border-top: 1px solid var(--asana-border-soft);
}

/* Sidebar */
.timeline-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--asana-border);
  background: #fff;
  overflow: hidden;
}
.timeline-sidebar-header {
  height: 52px;
  border-bottom: 1px solid var(--asana-border);
  background: #fafafa;
  flex-shrink: 0;
}
.timeline-sidebar-body {
  overflow-y: auto;
  flex: 1;
}

.timeline-section-header {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: #fafafa;
  border-bottom: 1px solid var(--asana-border-soft);
}
.timeline-section-header .chevron {
  cursor: pointer;
  color: var(--asana-muted);
  font-size: 0.85rem;
}

.timeline-task-label {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem 0 1.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--asana-border-soft);
  cursor: pointer;
}
.timeline-task-label:hover { background: var(--asana-bg-soft); }
.timeline-task-label.subtask {
  padding-left: 2.5rem;
  font-size: 0.825rem;
  color: var(--asana-text-2, #424345);
}
.timeline-task-label .task-name {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Corpo do timeline (scroll horizontal + vertical) */
.timeline-body {
  position: relative;
  overflow: auto;
}
.timeline-headers {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--asana-border);
}
.timeline-header-months,
.timeline-header-days {
  position: relative;
  height: 26px;
}
.timeline-header-months { background: #fff; }
.timeline-header-days {
  background: #fafafa;
  border-top: 1px solid var(--asana-border-soft);
}

.timeline-month-label {
  position: absolute;
  top: 4px;
  padding: 0.1rem 0.5rem;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}

.timeline-day-label {
  position: absolute;
  top: 6px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--asana-muted);
  user-select: none;
}
.timeline-day-label.today {
  color: var(--phi-purple, #5C1A5E);
  font-weight: 700;
}

.timeline-area {
  position: relative;
}

.timeline-day-col {
  position: absolute;
  top: 0;
  bottom: 0;
  border-right: 1px solid #f5f5f7;
}
.timeline-day-col.weekend {
  background: #fafafa;
}

.timeline-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--phi-purple, #5C1A5E);
  z-index: 2;
  pointer-events: none;
}
.timeline-today-line::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--phi-purple, #5C1A5E);
}

.timeline-task-bar {
  position: absolute;
  height: 26px;
  background: var(--phi-purple, #5C1A5E);
  color: #fff;
  border-radius: 6px;
  padding: 0 0.6rem;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 4;
}
.timeline-task-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  z-index: 5;
}
.timeline-task-bar.completed {
  background: #2db14a;
  text-decoration: line-through;
  opacity: 0.85;
}
.timeline-task-bar.subtask {
  height: 20px;
  font-size: 0.72rem;
  background: #9b6cab;
}

.timeline-empty {
  padding: 2rem;
  text-align: center;
  color: var(--asana-muted);
  font-size: 0.9rem;
}

/* Stack de avatares múltiplos */
.cell-assignee {
  display: flex;
  align-items: center;
}
.cell-assignee .avatar {
  margin-left: -6px;
  border: 2px solid #fff;
}
.cell-assignee .avatar:first-child { margin-left: 0; }
.cell-assignee:empty::before {
  content: "—";
  color: var(--asana-muted);
  margin-left: 0;
}

/* ============================================================
   Modal Compartilhar — lista de membros
   ============================================================ */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.member-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--asana-border-soft);
  border-radius: 6px;
  background: #fff;
}
.member-info { flex: 1; min-width: 0; }
.member-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--asana-text);
}
.member-username {
  font-size: 0.75rem;
  color: var(--asana-muted);
}
.member-owner-tag {
  font-size: 0.7rem;
  background: var(--phi-purple-50, #f3e8f7);
  color: var(--phi-purple);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.btn-remove-member {
  background: transparent;
  border: none;
  color: var(--asana-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-remove-member:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}
.btn-remove-member:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Modais acima do drawer/dropdowns (backdrop = 1490) */
#modalNewProject,
#modalNewUser,
#modalShareProject { z-index: 1500 !important; }
.modal-backdrop.show { z-index: 1490 !important; }

/* Botão de deletar projeto no header */
.btn-asana-danger {
  color: #e03131;
}
.btn-asana-danger:hover {
  background: rgba(224, 49, 49, 0.08);
  color: #c92a2a;
}

/* Tabela de usuários */
.users-table-wrap {
  background: #fff;
  border: 1px solid var(--asana-border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.users-table thead th {
  background: var(--asana-bg);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--asana-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--asana-border);
}
.users-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--asana-border-soft);
  vertical-align: middle;
}
.users-table tbody tr:last-child td {
  border-bottom: none;
}
.users-table tbody tr:hover td {
  background: var(--asana-hover);
}

/* Badges togláveis */
.badge-toggle {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.badge-toggle:hover:not(.badge-readonly) { opacity: 0.75; }
.badge-readonly { cursor: default; }
.badge-on    { background: #e8f0fe; color: #1a56db; }
.badge-off   { background: #f1f3f5; color: #868e96; }
.badge-active   { background: #ebfbee; color: #2f9e44; }
.badge-inactive { background: #fff5f5; color: #e03131; }