/* =============================================================
   FLOWLY — VIEW PROJECTS
   Estilos específicos da view Projetos (redesign 2026).
   Depende de: _tokens.css, _components.css.
   ============================================================= */

/* --- Layout principal: grid de cards + sidebar --- */
.projects-shell-v2 {
    max-width: var(--flowly-shell-max-wide);
    margin: 0 auto;
    width: 100%;
}

/* --- Resumo do header (substitui a faixa de KPIs) --- */
.projects-summary__danger { color: var(--flowly-accent-danger); font-weight: 600; }
.projects-summary__warn { color: var(--flowly-accent-warning); font-weight: 600; }

/* Ação pequena no cabeçalho de seção do detalhe ("Salvar" do checklist) */
.proj-modal-section__header--action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.proj-modal-section__action {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: calc(11px * var(--flowly-text-k));
    letter-spacing: 0;
    text-transform: none;
    color: var(--flowly-text-tertiary);
    cursor: pointer;
}
.proj-modal-section__action:hover { color: var(--flowly-accent-primary); }

/* --- Filter bar --- */
.projects-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 16px;
    flex-wrap: wrap;
}
.projects-filter-bar__search {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 240px;
    max-width: 380px;
    padding: 7px 10px;
    background: transparent;
    border: 1px solid var(--flowly-border, rgba(255, 255, 255, 0.06));
    border-radius: calc(8px * var(--flowly-radius-k));
    color: var(--flowly-text-tertiary);
}
.projects-filter-bar__search:focus-within {
    border-color: rgb(var(--flowly-accent-primary-rgb) / 0.4);
    background: var(--flowly-bg-glass-hover, rgba(255, 255, 255, 0.04));
}
.projects-filter-bar__search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--flowly-text-primary);
    font-size: calc(13px * var(--flowly-text-k));
    font-family: inherit;
    min-width: 0;
}
.projects-filter-bar__search input::placeholder {
    color: var(--flowly-text-tertiary, rgba(255, 255, 255, 0.32));
}
.projects-filter-bar__select {
    padding: 7px 10px;
    background: transparent;
    border: 1px solid var(--flowly-border, rgba(255, 255, 255, 0.06));
    border-radius: calc(8px * var(--flowly-radius-k));
    color: var(--flowly-text-primary);
    font-size: calc(12px * var(--flowly-text-k));
    font-family: inherit;
    cursor: pointer;
    min-width: 110px;
}
.projects-filter-bar__select:hover {
    background: var(--flowly-bg-glass-hover, rgba(255, 255, 255, 0.04));
}
.projects-filter-bar__chip {
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--flowly-border, rgba(255, 255, 255, 0.08));
    border-radius: calc(99px * var(--flowly-radius-k));
    color: var(--flowly-text-tertiary);
    font-size: calc(12px * var(--flowly-text-k));
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms, color 120ms, border-color 120ms;
}
.projects-filter-bar__chip:hover {
    background: var(--flowly-bg-glass-hover, rgba(255, 255, 255, 0.04));
    color: var(--flowly-text-primary);
}
.projects-filter-bar__chip.is-active {
    background: rgb(var(--flowly-accent-primary-rgb) / 0.12);
    color: var(--flowly-accent-primary);
    border-color: rgb(var(--flowly-accent-primary-rgb) / 0.32);
}
.projects-filter-bar__clear {
    padding: 7px 12px;
    background: transparent;
    border: 1px dashed var(--flowly-border-strong, rgba(255, 255, 255, 0.16));
    border-radius: calc(8px * var(--flowly-radius-k));
    color: var(--flowly-text-tertiary);
    font-size: calc(12px * var(--flowly-text-k));
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}
.projects-filter-bar__clear:hover {
    color: var(--flowly-accent-danger, #FF5C4D);
    border-color: rgb(var(--flowly-accent-danger-rgb) / 0.32);
}

/* Layout toggle (kanban/list) */
.projects-layout-toggle {
    display: inline-flex;
    margin-left: auto;
    padding: 2px;
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.025));
    border: 1px solid var(--flowly-border, rgba(255, 255, 255, 0.06));
    border-radius: calc(8px * var(--flowly-radius-k));
    gap: 1px;
}
.projects-layout-toggle__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: calc(6px * var(--flowly-radius-k));
    color: var(--flowly-text-tertiary);
    cursor: pointer;
    transition: background 120ms, color 120ms;
}
.projects-layout-toggle__btn:hover {
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
    color: var(--flowly-text-primary);
}
.projects-layout-toggle__btn.is-active {
    background: rgb(var(--flowly-accent-primary-rgb) / 0.14);
    color: var(--flowly-accent-primary);
}

/* Projects list view (alternative to kanban) */
.projects-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--flowly-border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: calc(12px * var(--flowly-radius-k));
    overflow: hidden;
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.015));
    margin-top: 12px;
}
.projects-list-row {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1.2fr 1.2fr 0.9fr;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--flowly-border-subtle, rgba(255, 255, 255, 0.04));
    transition: background 180ms ease, transform 180ms var(--flowly-ease-out, ease);
    cursor: pointer;
    position: relative;
}
.projects-list-row:last-child {
    border-bottom: 0;
}
.projects-list-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--flowly-accent-primary);
    opacity: 0;
    transition: opacity 180ms ease;
}
.projects-list-row:hover:not(.projects-list-row--head) {
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.035));
}
.projects-list-row:hover:not(.projects-list-row--head)::before {
    opacity: 1;
}
.projects-list-row--head {
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.02));
    font-size: calc(10px * var(--flowly-text-k));
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--flowly-text-tertiary);
    cursor: default;
}
.projects-list-row--head:hover {
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.02));
}

.projects-list-row__name {
    min-width: 0;
}
.projects-list-row__title {
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.projects-list-row__meta {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.projects-list-row__status {
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 600;
    padding: 3px 8px;
    border-radius: calc(99px * var(--flowly-radius-k));
    text-align: center;
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
    color: var(--flowly-text-secondary);
    justify-self: start;
    letter-spacing: 0.02em;
}
.projects-list-row__status[data-status="late"] {
    background: rgb(var(--flowly-accent-danger-rgb) / 0.12);
    color: var(--flowly-accent-danger, #FF5C4D);
}
.projects-list-row__status[data-status="doing"] {
    background: rgb(var(--flowly-accent-info-rgb) / 0.12);
    color: var(--flowly-accent-info);
}
.projects-list-row__status[data-status="done"] {
    background: rgb(var(--flowly-accent-success-rgb) / 0.12);
    color: var(--flowly-accent-success);
}
.projects-list-row__status[data-status="todo"] {
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
    color: var(--flowly-text-secondary);
    border: 1px solid var(--flowly-border-muted, rgba(255, 255, 255, 0.08));
}

.projects-list-row__progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.projects-list-row__progress-bar {
    flex: 1;
    height: 6px;
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.06));
    border-radius: calc(99px * var(--flowly-radius-k));
    overflow: hidden;
}
.projects-list-row__progress-bar span {
    display: block;
    height: 100%;
    background: var(--flowly-accent-primary);
    border-radius: calc(99px * var(--flowly-radius-k));
    transition: width 360ms var(--flowly-ease-out, ease), box-shadow 240ms ease;
    box-shadow: 0 0 6px rgb(var(--flowly-accent-primary-rgb) / 0.3);
}
.projects-list-row__progress-num {
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 700;
    color: var(--flowly-text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

.projects-list-row__value {
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--flowly-text-primary);
}
.projects-list-row__pending {
    display: block;
    font-size: calc(10px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}

.projects-list-row__head-end { text-align: right; }
.projects-list-row__progress.is-late .projects-list-row__progress-bar span {
    background: var(--flowly-accent-danger);
    box-shadow: none;
}
.projects-list-row__progress--empty {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
}
.projects-list-row__deadline {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-secondary);
    text-align: right;
    padding: 3px 9px;
    border-radius: calc(99px * var(--flowly-radius-k));
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.03));
    font-weight: 500;
    justify-self: end;
    transition: background 180ms ease, color 180ms ease;
}

.projects-list-row__deadline.is-late {
    color: var(--flowly-accent-danger, #FF5C4D);
    background: rgb(var(--flowly-accent-danger-rgb) / 0.12);
    font-weight: 600;
    box-shadow: 0 0 8px rgb(var(--flowly-accent-danger-rgb) / 0.2);
}

.projects-list-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--flowly-text-tertiary);
    font-size: calc(13px * var(--flowly-text-k));
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.015));
    border: 1px dashed var(--flowly-border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: calc(12px * var(--flowly-radius-k));
    margin-top: 12px;
}
.projects-list-empty__action {
    display: block;
    margin: 10px auto 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: calc(13px * var(--flowly-text-k));
    color: var(--flowly-accent-success);
    cursor: pointer;
}
.projects-list-empty__action:hover { text-decoration: underline; }

@media (max-width: 768px) {
    /* layout forçado pra lista no mobile — toggle não faz sentido */
    .projects-layout-toggle {
        display: none;
    }
}

@media (max-width: 720px) {
    .projects-list-row {
        grid-template-columns: 1.6fr 1fr 0.8fr;
        gap: 10px;
        padding: 12px 14px;
    }
    .projects-list-row__progress,
    .projects-list-row__deadline {
        display: none;
    }
    .projects-list-row--head > div:nth-child(3),
    .projects-list-row--head > div:nth-child(5) {
        display: none;
    }
}

@media (max-width: 720px) {
    .projects-filter-bar__search {
        max-width: none;
        min-width: 0;
        flex: 1 1 100%;
        order: -1;
    }
    .projects-filter-bar__clear {
        margin-left: 0;
    }
}

/* =============================================================
   Kanban Board (Projetos)
   ============================================================= */
.kanban-board {
    display: grid;
    grid-template-columns: var(--kb-cols, repeat(4, minmax(0, 1fr)));
    gap: var(--flowly-space-5, 20px);
    align-items: start;
}

/* Coluna sem caixa: só título + contagem; o card é o único elemento com fundo */
.kanban-column {
    border: 1px dashed transparent;
    border-radius: var(--flowly-radius-lg, 12px);
    padding: 4px;
    margin: -4px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kanban-column.is-drop-target {
    background: rgb(var(--flowly-accent-primary-rgb, 10, 132, 255) / 0.06);
    border-color: rgb(var(--flowly-accent-primary-rgb, 10, 132, 255) / 0.4);
}

.kanban-column--readonly .kanban-column__title { color: var(--flowly-accent-danger, #FF5C4D); }
.kanban-column--readonly .kanban-column__count { color: var(--flowly-accent-danger, #FF5C4D); }
/* Quando a coluna readonly está vazia (count=0), esmaece o título pra não
   gritar "atraso!" no board zerado — só acende vermelho quando há algo atrasado. */
.kanban-column--readonly.kanban-column--empty .kanban-column__title { color: var(--flowly-text-tertiary, rgba(255, 255, 255, 0.32)); }
.kanban-column--readonly.kanban-column--empty .kanban-column__count { color: var(--flowly-text-tertiary); }

.kanban-column__header {
    padding: 0 2px;
}
.kanban-column__title {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-primary);
}
.kanban-column__count {
    font-size: calc(12px * var(--flowly-text-k));
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--flowly-text-tertiary);
}
.kanban-column--empty .kanban-column__title { color: var(--flowly-text-tertiary); }

/* Color-coded column header por status do kanban */
.kanban-column[data-status="todo"] .kanban-column__title { color: var(--flowly-text-secondary); }
.kanban-column[data-status="doing"] .kanban-column__title { color: var(--flowly-accent-info); }
.kanban-column[data-status="late"] .kanban-column__title { color: var(--flowly-accent-danger); }
.kanban-column[data-status="done"] .kanban-column__title { color: var(--flowly-accent-success); }

.kanban-column[data-status="doing"] .kanban-column__count {
    color: var(--flowly-accent-info);
    background: rgb(var(--flowly-accent-info-rgb, 10, 132, 255) / 0.12);
}
.kanban-column[data-status="late"] .kanban-column__count {
    color: var(--flowly-accent-danger);
    background: rgb(var(--flowly-accent-danger-rgb) / 0.12);
}
.kanban-column[data-status="late"] .kanban-column__count.is-zero {
    color: var(--flowly-text-tertiary);
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
}
.kanban-column[data-status="done"] .kanban-column__count {
    color: var(--flowly-accent-success);
    background: rgb(var(--flowly-accent-success-rgb) / 0.12);
}

.kanban-column__hint {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-muted, rgba(255, 255, 255, 0.4));
    letter-spacing: 0;
    text-transform: none;
}

.kanban-column__body {
    display: flex;
    flex-direction: column;
    gap: var(--flowly-space-2);
    min-height: 48px; /* alvo de drop mesmo vazia */
}

.kanban-card {
    position: relative;
    background: var(--flowly-bg-elevated, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--flowly-border-subtle, rgba(255, 255, 255, 0.08));
    border-left: 3px solid var(--proj-accent, rgba(255, 255, 255, 0.3));
    border-radius: var(--flowly-radius-md, 10px);
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: grab;
    transition: background 0.18s ease, border-color 0.18s ease,
                transform 0.18s var(--flowly-ease-out, ease),
                box-shadow 0.18s ease;
}
.kanban-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.kanban-card__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--proj-accent, rgba(255, 255, 255, 0.3));
    box-shadow: 0 0 6px var(--proj-accent, transparent);
}

/* Per-project accent (left border + subtle bg tint) */
.kanban-card[data-project-color="blue"]   { --proj-accent: var(--flowly-accent-info); }
.kanban-card[data-project-color="purple"] { --proj-accent: var(--flowly-accent-purple); }
.kanban-card[data-project-color="pink"]   { --proj-accent: #FF375F; }
.kanban-card[data-project-color="green"]  { --proj-accent: var(--flowly-accent-success); }
.kanban-card[data-project-color="amber"]  { --proj-accent: var(--flowly-accent-warning); }
.kanban-card[data-project-color="red"]    { --proj-accent: var(--flowly-accent-danger); }
.kanban-card[data-project-color="cyan"]   { --proj-accent: #64D2FF; }
.kanban-card[data-project-color="slate"]  { --proj-accent: #8E8E93; }

.kanban-card__title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}
.kanban-card__icon-emoji {
    font-size: calc(15px * var(--flowly-text-k));
    line-height: 1;
    flex-shrink: 0;
}
.kanban-card__icon-img {
    width: 16px;
    height: 16px;
    border-radius: calc(4px * var(--flowly-radius-k));
    object-fit: cover;
    flex-shrink: 0;
}

.kanban-card:hover {
    background: var(--flowly-bg-elevated-hover, rgba(255, 255, 255, 0.06));
    border-color: var(--flowly-border-strong, rgba(255, 255, 255, 0.16));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--proj-accent, rgba(255, 255, 255, 0.06));
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.is-dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.kanban-card__title {
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.kanban-card__sub {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kanban-card__progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
}
.kanban-card__progress .flowly-progress { flex: 1; }
.kanban-card__progress--empty {
    color: var(--flowly-text-muted, rgba(255, 255, 255, 0.3));
    font-style: italic;
}
/* Nudge "tudo feito": visível sem hover, tom success discreto */
.kanban-card__nudge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 8px;
    border: 1px solid rgb(var(--flowly-accent-success-rgb) / 0.25);
    border-radius: var(--flowly-radius-sm, 8px);
    background: rgb(var(--flowly-accent-success-rgb) / 0.08);
    color: var(--flowly-accent-success);
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.kanban-card__nudge:hover {
    background: rgb(var(--flowly-accent-success-rgb) / 0.16);
    border-color: rgb(var(--flowly-accent-success-rgb) / 0.4);
}

.kanban-card__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    margin-top: 2px;
}
.kanban-card__deadline { flex: 1; white-space: nowrap; }
.kanban-card__deadline.is-late { color: var(--flowly-accent-danger, #FF5C4D); font-weight: 600; }
/* Tarefas do projeto pra hoje: "2 hoje" / "✓ hoje" */
.kanban-card__today {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--flowly-text-secondary);
    white-space: nowrap;
}
.kanban-card__today.is-done { color: var(--flowly-accent-success); }
.kanban-card__today svg { width: 12px; height: 12px; stroke-width: 2.5; }
.kanban-card__amount {
    font-family: var(--flowly-font-display, inherit);
    font-weight: 700;
    color: var(--flowly-text-primary);
}
.kanban-card__avatar {
    flex-shrink: 0;
}

/* Badge de tipo de serviço no card */

/* Barra de ações por ícone — aparece no hover (desktop) */
.kanban-card__actions {
    /* Flutua sobre o canto: invisível não pode roubar largura do título */
    position: absolute;
    top: 7px;
    right: 7px;
    display: flex;
    gap: 2px;
    padding: 1px;
    border-radius: var(--flowly-radius-sm, 7px);
    background: var(--flowly-bg-overlay, rgba(18, 19, 26, 0.92));
    box-shadow: 0 0 0 1px var(--flowly-border-subtle, rgba(255, 255, 255, 0.08));
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--flowly-duration-fast) ease;
}
.kanban-card:hover .kanban-card__actions,
.kanban-card:focus-within .kanban-card__actions {
    opacity: 1;
    pointer-events: auto;
}
.kanban-card__act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: var(--flowly-radius-sm, 7px);
    background: transparent;
    color: var(--flowly-text-tertiary);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.kanban-card__act svg { width: 14px; height: 14px; }
.kanban-card__act:hover {
    background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.06));
    color: var(--flowly-text-primary);
}
.kanban-card__act--done:hover {
    background: rgb(var(--flowly-accent-success-rgb) / 0.14);
    color: var(--flowly-accent-success);
}

/* Peek: próximas tarefas do projeto no card */
.kanban-card__tasks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.kanban-card__task {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 2px 0;
    min-width: 0;
}
.kanban-card__task-check {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    padding: 0;
    border-radius: calc(4px * var(--flowly-radius-k));
    border: 1.5px solid var(--flowly-border-muted, rgba(255, 255, 255, 0.18));
    background: transparent;
    color: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.kanban-card__task-check svg { width: 9px; height: 9px; }
.kanban-card__task-check:hover {
    border-color: var(--flowly-accent-success);
    color: rgb(var(--flowly-accent-success-rgb) / 0.5);
}
.kanban-card__task.is-checking .kanban-card__task-check {
    background: var(--flowly-accent-success);
    border-color: var(--flowly-accent-success);
    color: #fff;
}
.kanban-card__task-text {
    font-size: calc(12px * var(--flowly-text-k));
    color: var(--flowly-text-secondary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.kanban-card__task.is-checking .kanban-card__task-text {
    text-decoration: line-through;
    color: var(--flowly-text-tertiary);
}
.kanban-card__task-more {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    padding: 3px 0 0 22px;
    cursor: pointer;
}
.kanban-card__task-more:hover { color: var(--flowly-accent-primary); }

/* Mobile: ações sempre visíveis (sem hover) */
@media (max-width: 768px) {
    .kanban-card__actions { opacity: 1; }
}

@media (max-width: 600px) {
    .kanban-board { flex-direction: column; }
    .kanban-column { flex: unset; min-width: unset; max-width: unset; width: 100%; }
    .kanban-column--empty { flex: unset; min-width: unset; max-width: unset; width: 100%; writing-mode: unset; transform: none; }
    .kanban-column--empty .kanban-column__title { writing-mode: unset; transform: none; }
    .kanban-column--empty .kanban-column__body { display: flex; }
}

/* =============================================================
   MODAL REDESIGN 2026 — proj-modal-*
   ============================================================= */

/* Reset padding do modal base — layout próprio por seção */
#projectDetailModalContent {
    padding: 0;
}

/* ── Hero: título + status ─────────────────────────────────── */
.proj-modal-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 6px;
    border-bottom: 1px solid var(--flowly-border-muted, rgba(255,255,255,0.05));
}
.proj-modal-identity__icon-wrap {
    flex-shrink: 0;
}
.proj-modal-identity__icon {
    width: 56px;
    height: 56px;
    border-radius: calc(14px * var(--flowly-radius-k));
    border: 1px solid var(--flowly-border-subtle, rgba(255,255,255,0.08));
    background: var(--flowly-bg-glass, rgba(255,255,255,0.03));
    font-size: calc(26px * var(--flowly-text-k));
    text-align: center;
    color: var(--flowly-text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.proj-modal-identity__icon:focus {
    border-color: var(--flowly-accent-info, #0A84FF);
}
.proj-modal-identity__icon::placeholder {
    color: var(--flowly-text-muted, rgba(255,255,255,0.3));
    font-size: calc(22px * var(--flowly-text-k));
}
.proj-modal-identity__palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.proj-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--swatch);
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    padding: 0;
}
.proj-color-swatch:hover { transform: scale(1.12); }
.proj-color-swatch.is-active {
    border-color: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 0 12px var(--swatch);
}
.proj-color-swatch--blue   { --swatch: var(--flowly-accent-info); }
.proj-color-swatch--purple { --swatch: var(--flowly-accent-purple); }
.proj-color-swatch--pink   { --swatch: #FF375F; }
.proj-color-swatch--green  { --swatch: var(--flowly-accent-success); }
.proj-color-swatch--amber  { --swatch: var(--flowly-accent-warning); }
.proj-color-swatch--red    { --swatch: var(--flowly-accent-danger); }
.proj-color-swatch--cyan   { --swatch: #64D2FF; }
.proj-color-swatch--slate  { --swatch: #8E8E93; }

.proj-modal-name {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--flowly-font-display);
    font-size: calc(22px * var(--flowly-text-k));
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--flowly-text-primary);
    padding: 0;
    line-height: 1.2;
}
.proj-modal-name:focus {
    color: var(--flowly-text-primary);
}
.proj-modal-name::placeholder { color: var(--flowly-text-muted, rgba(255,255,255,0.25)); }

.proj-modal-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Status dot */
.proj-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.proj-dot--done  { background: var(--flowly-accent-success); }
.proj-dot--late  { background: var(--flowly-accent-danger); box-shadow: 0 0 6px rgb(var(--flowly-accent-danger-rgb) / 0.5); }
.proj-dot--doing { background: var(--flowly-accent-primary); }
.proj-dot--idle  { background: var(--flowly-text-muted, rgba(255,255,255,0.3)); }

.proj-modal-status-text {
    font-size: calc(12px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Progress ──────────────────────────────────────────────── */
.proj-modal-progress {
    padding: 0 var(--flowly-space-5) var(--flowly-space-3);
}
.proj-modal-progress__bar {
    height: 3px;
    background: var(--flowly-bg-glass-hover, rgba(255,255,255,0.07));
    border-radius: calc(99px * var(--flowly-radius-k));
    overflow: hidden;
}
.proj-modal-progress__fill {
    height: 100%;
    background: var(--flowly-accent-primary);
    border-radius: calc(99px * var(--flowly-radius-k));
    transition: width 0.4s ease;
}
.proj-modal-progress.is-late .proj-modal-progress__fill { background: var(--flowly-accent-danger); }

/* ── Props list ────────────────────────────────────────────── */
.proj-modal-props {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-lg);
    overflow: hidden;
    margin-bottom: var(--flowly-space-4);
}

.proj-modal-prop {
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid var(--flowly-border-subtle);
    padding: 6px 12px;
    gap: var(--flowly-space-3);
}
.proj-modal-prop:last-child { border-bottom: none; }

.proj-modal-prop__label {
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
    user-select: none;
}

.proj-modal-prop__input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 500;
    color: var(--flowly-text-primary);
    font-family: var(--flowly-font-main);
    padding: 2px 0;
    min-width: 0;
}
.proj-modal-prop__input::placeholder { color: var(--flowly-text-muted, rgba(255,255,255,0.22)); font-weight: 400; }
.proj-modal-prop__input:focus { color: var(--flowly-text-primary); }
.proj-modal-prop__input--number { font-family: var(--flowly-font-display); }

/* Valor row: R$ prefix + input + Pago toggle */
.proj-modal-value-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.proj-modal-currency {
    font-size: calc(12px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-tertiary);
    flex-shrink: 0;
}

/* Pagamento segmentado */
.proj-modal-prop--payment { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.proj-payment-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.proj-payment-seg {
    display: flex;
    gap: 2px;
    background: var(--flowly-bg-glass-strong, rgba(255,255,255,0.04));
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-md);
    padding: 3px;
}
.proj-payment-seg__btn {
    flex: 1;
    padding: 5px 10px;
    border-radius: calc(var(--flowly-radius-md) - 2px);
    border: none;
    background: transparent;
    color: var(--flowly-text-tertiary);
    font-size: calc(11.5px * var(--flowly-text-k));
    font-weight: 600;
    font-family: var(--flowly-font-main);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--flowly-duration-fast), color var(--flowly-duration-fast), box-shadow var(--flowly-duration-fast);
}
.proj-payment-seg__btn:hover:not(.is-active) {
    color: var(--flowly-text-secondary);
    background: var(--flowly-bg-glass-strong, rgba(255,255,255,0.04));
}
.proj-payment-seg__btn.is-active {
    background: var(--flowly-bg-elevated);
    color: var(--flowly-text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
/* Verde quando "Pago" está ativo */
.proj-payment-seg__btn[data-pay-mode="full"].is-active {
    background: rgb(var(--flowly-accent-success-rgb, 48,209,88) / 0.15);
    color: var(--flowly-accent-success);
}
/* Laranja para "Meio a meio" */
.proj-payment-seg__btn[data-pay-mode="half"].is-active {
    background: rgb(var(--flowly-accent-warning-rgb) / 0.12);
    color: var(--flowly-accent-warning);
}

.proj-payment-summary {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-accent-warning);
    font-weight: 500;
}
.proj-payment-summary--paid {
    color: var(--flowly-accent-success);
}

/* Datas */
.proj-modal-prop--dates { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.proj-modal-dates-row {
    display: flex;
    gap: var(--flowly-space-4);
}
.proj-modal-date-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}
.proj-modal-date-label {
    font-size: calc(10px * var(--flowly-text-k));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--flowly-text-muted, rgba(255,255,255,0.28));
}
.proj-modal-date-btn {
    background: var(--flowly-bg-glass-strong, rgba(255,255,255,0.05));
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-sm);
    color: var(--flowly-text-primary);
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    font-family: var(--flowly-font-display);
    padding: 4px 12px;
    cursor: pointer;
    transition: background var(--flowly-duration-fast), border-color var(--flowly-duration-fast);
    white-space: nowrap;
}
.proj-modal-date-btn:hover {
    background: rgb(var(--flowly-accent-primary-rgb) / 0.1);
    border-color: rgb(var(--flowly-accent-primary-rgb) / 0.3);
}
.proj-modal-date-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Opções chips */
.proj-modal-prop--options { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.proj-modal-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.proj-modal-chip-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: calc(99px * var(--flowly-radius-k));
    border: 1px solid var(--flowly-border-subtle);
    background: var(--flowly-bg-glass, rgba(255,255,255,0.03));
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 500;
    color: var(--flowly-text-tertiary);
    cursor: pointer;
    user-select: none;
    transition: background var(--flowly-duration-fast), color var(--flowly-duration-fast);
}
.proj-modal-chip-toggle:has(input:checked) {
    background: rgb(var(--flowly-accent-primary-rgb) / 0.1);
    border-color: rgb(var(--flowly-accent-primary-rgb) / 0.25);
    color: var(--flowly-accent-primary);
}
.proj-modal-chip-toggle input { display: none; }

/* ── Sections (Notas, Checklist, Tarefas) ───────────────────── */
.proj-modal-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: var(--flowly-space-2);
    margin-bottom: var(--flowly-space-4);
}
.proj-modal-section__header {
    font-size: calc(10px * var(--flowly-text-k));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--flowly-text-tertiary);
}
.proj-modal-textarea {
    font-size: calc(13px * var(--flowly-text-k));
    min-height: 72px;
    resize: vertical;
}

/* --- Tab bar (Ativos / Arquivados) --- */
.projects-tab-bar {
    display: flex;
    gap: 2px;
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-md);
    padding: 3px;
}
.projects-tab-btn {
    padding: 5px 14px;
    border-radius: calc(var(--flowly-radius-md) - 2px);
    border: none;
    background: transparent;
    color: var(--flowly-text-tertiary);
    font-size: calc(12px * var(--flowly-text-k));
    font-weight: 600;
    font-family: var(--flowly-font-main);
    cursor: pointer;
    transition: background var(--flowly-duration-fast) ease, color var(--flowly-duration-fast) ease;
    white-space: nowrap;
}
.projects-tab-btn:hover {
    color: var(--flowly-text-secondary);
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
}
.projects-tab-btn.is-active {
    background: var(--flowly-bg-elevated);
    color: var(--flowly-text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* =============================================================
   ARQUIVO — shell, stats, grupos, linhas
   ============================================================= */

.arch-shell {
    display: flex;
    flex-direction: column;
    gap: var(--flowly-space-5);
}

/* ── Stats ───────────────────────────────────────────────── */
.arch-stats {
    display: flex;
    gap: 0;
    background: var(--flowly-bg-elevated);
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-lg);
    overflow: hidden;
}

.arch-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border-right: 1px solid var(--flowly-border-subtle);
    min-width: 0;
}
.arch-stat:last-child { border-right: none; }

.arch-stat__value {
    font-family: var(--flowly-font-display);
    font-size: calc(20px * var(--flowly-text-k));
    font-weight: 700;
    color: var(--flowly-text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.arch-stat__value small {
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    opacity: 0.6;
    margin-left: 1px;
}
.arch-stat--success .arch-stat__value { color: var(--flowly-accent-success); }

.arch-stat__label {
    font-size: calc(10px * var(--flowly-text-k));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
}

/* ── Grupo por ano ───────────────────────────────────────── */
.arch-group {
    display: flex;
    flex-direction: column;
    gap: var(--flowly-space-2);
}

.arch-group__header {
    display: flex;
    align-items: center;
    gap: var(--flowly-space-3);
    padding: 0 0 var(--flowly-space-1);
}
.arch-group__year {
    font-size: calc(11px * var(--flowly-text-k));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
}
.arch-group__divider {
    flex: 1;
    height: 1px;
    background: var(--flowly-border-subtle);
}
.arch-group__summary {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-muted, rgba(255,255,255,0.3));
    white-space: nowrap;
}

.arch-group__rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Linha de projeto ────────────────────────────────────── */
.arch-row {
    display: grid;
    /* indicator | identity | chips | tasks | value | date | actions */
    grid-template-columns: 3px 1fr auto auto 110px 58px auto;
    align-items: center;
    gap: 0 12px;
    padding: 10px 12px 10px 0;
    border-radius: var(--flowly-radius-md);
    cursor: pointer;
    transition: background var(--flowly-duration-fast) ease;
    position: relative;
    overflow: hidden;
}
.arch-row:hover {
    background: var(--flowly-bg-glass, rgba(255,255,255,0.03));
}
.arch-row:hover .arch-row__actions {
    opacity: 1;
}

/* Indicador colorido à esquerda */
.arch-row__indicator {
    width: 3px;
    height: 28px;
    border-radius: calc(99px * var(--flowly-radius-k));
    flex-shrink: 0;
    margin-left: 4px;
}

/* Identidade: nome + cliente */
.arch-row__identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.arch-row__name {
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.arch-row__best-badge {
    font-size: calc(9px * var(--flowly-text-k));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flowly-accent-warning);
    background: rgb(var(--flowly-accent-warning-rgb) / 0.12);
    padding: 1px 5px;
    border-radius: calc(99px * var(--flowly-radius-k));
    border: 1px solid rgb(var(--flowly-accent-warning-rgb) / 0.2);
    white-space: nowrap;
}
.arch-row__client {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chips: tipo + duração */
.arch-row__chips {
    display: flex;
    align-items: center;
    gap: 5px;
}
.arch-row__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--flowly-radius-sm);
    font-size: calc(10px * var(--flowly-text-k));
    font-weight: 600;
    background: var(--flowly-bg-glass-strong, rgba(255,255,255,0.05));
    color: var(--flowly-text-tertiary);
    border: 1px solid var(--flowly-border-subtle);
    white-space: nowrap;
}
.arch-row__chip--type {
    background: rgb(var(--flowly-accent-primary-rgb) / 0.08);
    border-color: rgb(var(--flowly-accent-primary-rgb) / 0.2);
    color: var(--flowly-accent-primary);
}

/* Tasks progress */
.arch-row__tasks {
    min-width: 80px;
}
.arch-row__progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.arch-row__progress-bar {
    flex: 1;
    height: 3px;
    background: var(--flowly-bg-glass-hover, rgba(255,255,255,0.08));
    border-radius: calc(99px * var(--flowly-radius-k));
    overflow: hidden;
    min-width: 36px;
}
.arch-row__progress-fill {
    height: 100%;
    border-radius: calc(99px * var(--flowly-radius-k));
    transition: width 0.3s ease;
}
.arch-row__progress-label {
    font-size: calc(10.5px * var(--flowly-text-k));
    font-weight: 600;
    color: var(--flowly-text-tertiary);
    white-space: nowrap;
}
.arch-row__no-tasks {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-muted, rgba(255,255,255,0.22));
}

/* Valor */
.arch-row__value {
    text-align: right;
}
.arch-row__amount {
    font-family: var(--flowly-font-display);
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 700;
    color: var(--flowly-text-secondary);
    white-space: nowrap;
}
.arch-row__amount--paid { color: var(--flowly-accent-success); }
.arch-row__amount--empty { color: var(--flowly-text-muted, rgba(255,255,255,0.22)); }

/* Data */
.arch-row__date {
    font-size: calc(11px * var(--flowly-text-k));
    color: var(--flowly-text-muted, rgba(255,255,255,0.28));
    text-align: right;
    white-space: nowrap;
}

/* Botão restaurar — sempre visível */
.arch-row__actions {
    display: flex;
    justify-content: flex-end;
}
.arch-row__restore {
    white-space: nowrap;
    font-size: calc(11px * var(--flowly-text-k));
    opacity: 0.55;
    transition: opacity var(--flowly-duration-fast) ease;
}
.arch-row:hover .arch-row__restore {
    opacity: 1;
}

@media (max-width: 768px) {
    .arch-stats { flex-wrap: wrap; }
    .arch-stat { flex: 1 1 45%; border-bottom: 1px solid var(--flowly-border-subtle); }
    .arch-row {
        grid-template-columns: 3px 1fr auto;
        grid-template-rows: auto auto auto;
    }
    .arch-row__chips,
    .arch-row__tasks,
    .arch-row__value,
    .arch-row__date,
    .arch-row__actions { display: none; }

    /* Kanban: scroll horizontal em vez de 4 colunas espremidas em 375px. */
    .kanban-board {
        grid-template-columns: repeat(4, 78vw);
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        gap: var(--flowly-space-3);
        padding-bottom: var(--flowly-space-2);
        -webkit-overflow-scrolling: touch;
    }
    .kanban-column {
        scroll-snap-align: start;
        min-width: 0;
    }
    .kanban-stats-strip {
        flex-wrap: wrap;
    }
    .kanban-stats-strip .flowly-stat-card--inline {
        flex: 1 1 45%;
    }
}

/* --- Config field --- */
.projects-config-field {
    display: flex; flex-direction: column; gap: 4px;
}
.projects-config-field span {
    font-size: calc(10px * var(--flowly-text-k)); font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--flowly-text-tertiary);
}

/* --- Status badges --- */

/* =============================================================
   PROJECT DETAIL PAGE — detalhe full-width (board some, voltar)
   ============================================================= */
.project-detail-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.project-detail-page {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    background: var(--flowly-bg-body, #08090e);
    animation: pdpIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pdpIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Topbar: voltar + ações globais */
.pdp-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(8, 9, 14, 0.82);
    backdrop-filter: blur(var(--flowly-blur-panel, 16px));
    -webkit-backdrop-filter: blur(var(--flowly-blur-panel, 16px));
    border-bottom: 1px solid var(--flowly-border-subtle);
}
.pdp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border: none;
    border-radius: var(--flowly-radius-md, 9px);
    background: transparent;
    color: var(--flowly-text-secondary);
    font-size: calc(13px * var(--flowly-text-k));
    font-weight: 600;
    font-family: var(--flowly-font-main);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.pdp-back:hover { background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.05)); color: var(--flowly-text-primary); }
.pdp-topbar__actions { display: flex; align-items: center; gap: 8px; }
.pdp-danger:hover { color: var(--flowly-accent-danger); }
.pdp-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--flowly-border-subtle);
    border-radius: var(--flowly-radius-md, 9px);
    background: var(--flowly-bg-glass-strong, rgba(255, 255, 255, 0.04));
    color: var(--flowly-text-secondary);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.pdp-close:hover {
    background: rgb(var(--flowly-accent-danger-rgb) / 0.12);
    border-color: rgb(var(--flowly-accent-danger-rgb) / 0.32);
    color: var(--flowly-accent-danger);
}

.pdp-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 26px 28px 60px;
}

/* Header: identidade + nome + status + progresso */
.pdp-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}
.pdp-header .proj-modal-identity__icon-wrap { flex-shrink: 0; }
.pdp-header .proj-modal-identity__palette {
    flex: 0 1 auto;
    justify-content: flex-end;
    /* 8 swatches de 26px + 7 gaps de 8px = 264px; com 240px o último caía pra segunda linha */
    max-width: 264px;
}
.pdp-progress {
  grid-column: 1 / -1;
  padding: 0;
  margin: 4px 0 0;
}
.pdp-headline { min-width: 0; }
.pdp-name {
    width: 100%;
    font-size: calc(26px * var(--flowly-text-k));
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Grid 2 colunas: tarefas (foco) + propriedades */
.pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}
.pdp-main { min-width: 0; }
.pdp-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-left: 28px;
    border-left: 1px solid var(--flowly-border-subtle);
}

/* Tarefas como herói da coluna principal */
.pdp-main .proj-modal-section__header {
    font-size: calc(13px * var(--flowly-text-k));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

@media (max-width: 860px) {
    .pdp-grid { grid-template-columns: 1fr; gap: 26px; }
    .pdp-side {
        padding-left: 0;
        border-left: none;
        padding-top: 22px;
        border-top: 1px solid var(--flowly-border-subtle);
    }
    .pdp-container { padding: 20px 18px 50px; }
    .pdp-topbar { padding: 12px 18px; }
}

/* Tarefas dentro do drawer */
.pdp-tasks { display: flex; flex-direction: column; gap: 1px; }
.pdp-tasks[hidden] { display: none; }
.pdp-tasks-empty {
    padding: 10px 2px;
    font-size: calc(13px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
}
/* Pendente tracejado, igual à Hoje */
.pdp-tasks .checkbox-custom:not(:checked) { border-style: dashed; }
/* ▷ só no hover/foco da linha ou rodando, igual à Hoje */
.pdp-tasks .task-item .task-item-timer-btn { opacity: 0; transition: opacity var(--flowly-duration-fast, 150ms) ease; }
.pdp-tasks .task-item:hover .task-item-timer-btn,
.pdp-tasks .task-item:focus-within .task-item-timer-btn,
.pdp-tasks .task-item .task-item-timer-btn.is-running { opacity: 0.94; }
.pdp-done-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 4px 2px;
    border: 0;
    background: none;
    font: inherit;
    font-size: calc(12px * var(--flowly-text-k));
    color: var(--flowly-text-tertiary);
    cursor: pointer;
}
.pdp-done-toggle:hover { color: var(--flowly-text-secondary); }
.pdp-done-toggle svg { width: 13px; height: 13px; }
.pdp-done-toggle:first-of-type svg:first-child { color: var(--flowly-accent-success); }
.pdp-done-toggle__chev { transition: transform var(--flowly-duration-fast, 150ms) ease; }
.pdp-done-toggle.is-open .pdp-done-toggle__chev { transform: rotate(180deg); }
.pdp-tasks--done { margin-top: 4px; }

.proj-drawer-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px dashed var(--flowly-border-muted, rgba(255, 255, 255, 0.14));
    border-radius: calc(8px * var(--flowly-radius-k));
    transition: border-color 0.12s ease;
}
.proj-drawer-add:focus-within { border-color: rgb(var(--flowly-accent-primary-rgb) / 0.4); }
.proj-drawer-add__plus { color: var(--flowly-text-tertiary); font-size: calc(15px * var(--flowly-text-k)); line-height: 1; }
.proj-drawer-add__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--flowly-text-primary);
    font-size: calc(13.5px * var(--flowly-text-k));
    font-family: var(--flowly-font-main);
}
.proj-drawer-add__input::placeholder { color: var(--flowly-text-tertiary); }

.proj-modal-section__count {
    margin-left: 6px;
    font-size: 0.82em;
    font-weight: 500;
    color: var(--flowly-text-tertiary);
}
@media (prefers-reduced-motion: reduce) {
  .project-detail-page { animation: none; }
}

/* Templates na aba Arquivados (projeto isDraft sai do board) */
.projects-templates { margin-bottom: 20px; }
.projects-templates__title { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: calc(12px * var(--flowly-text-k)); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--flowly-text-tertiary); }
.projects-templates__count { font-weight: 600; color: var(--flowly-text-secondary); }
.projects-templates__list { display: flex; flex-wrap: wrap; gap: 8px; }
.projects-template-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px dashed var(--flowly-border-strong, rgba(255, 255, 255, 0.14)); background: var(--flowly-bg-glass, rgba(255, 255, 255, 0.03)); color: var(--flowly-text-primary); font-size: calc(13px * var(--flowly-text-k)); cursor: pointer; }
.projects-template-chip small { color: var(--flowly-text-tertiary); font-size: calc(11px * var(--flowly-text-k)); }
.projects-template-chip:hover, .projects-template-chip:focus-visible { background: var(--flowly-bg-glass-hover, rgba(255, 255, 255, 0.06)); border-style: solid; }
