/* =========================================================================
   fhinkBoard - estilos globais
   Paleta inspirada em ferramentas corporativas modernas (Monday/Asana).
   ========================================================================= */

:root {
    --color-bg: #f6f7fb;
    --color-surface: #ffffff;
    --color-surface-2: #fafbfd;
    --color-border: #e6e9f0;
    --color-border-strong: #d4d9e4;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-text-soft: #9ca3af;

    --color-primary: #db5812;          
    --color-primary-hover: #db5812;
    --color-primary-soft: #e6f1fc;

    --color-todo: #c4c4c4;
    --color-doing: #fdab3d;
    --color-done: #00c875;
    --color-danger: #e2445c;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.18);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --sidebar-w: 232px;
    --topbar-h: 72px;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.muted {
    color: var(--color-text-muted);
    margin: 4px 0 0;
}

.hidden {
    display: none !important;
}

.text-right {
    text-align: right;
}

/* ---------- Layout principal ----------------------------------------------*/
body {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background:#01012e;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.brand-logo {
    height: 50px;
    width: auto;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    display: block;
    box-shadow: var(--shadow-sm);
}

.brand-suffix {
    color: #e0e4f2;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 15px;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #b6bdd3;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: var(--color-primary);
    color: #fff;
}

.nav-icon {
    display: inline-block;
    width: 18px;
    text-align: center;
    opacity: 0.9;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-badge {
    background: rgba(0, 115, 234, 0.25);
    color: #9ecbff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.user-logout {
    margin: 0;
}

.user-logout .icon-btn {
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
}

.user-logout .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- Toggle da sidebar (recolher / expandir) ----------------------*/
.sidebar-toggle {
    position: absolute;
    top: 28px;
    right: -14px;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 5;
    padding: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s, right 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.sidebar-toggle-icon {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
    transition: transform 0.2s ease;
}

html.sidebar-collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.sidebar {
    transition: width 0.2s ease;
}

/* Estado recolhido — sidebar some por completo; só o botão de toggle fica */
html.sidebar-collapsed .sidebar {
    width: 0;
    overflow: visible;
    border-right: none;
}
html.sidebar-collapsed .sidebar > :not(.sidebar-toggle) {
    display: none !important;
}
html.sidebar-collapsed .sidebar-toggle {
    right: -34px;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-h);
    padding: 16px 32px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content {
    padding: 24px 32px 56px;
    flex: 1;
}

/* ---------- Botões --------------------------------------------------------*/
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s,
        box-shadow 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-ghost {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text);
}
.btn-ghost:hover {
    background: var(--color-surface-2);
}
.btn-ghost.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-color: var(--color-primary-soft);
}

.btn-danger {
    background: transparent;
    color: var(--color-danger);
    border-color: transparent;
}
.btn-danger:hover {
    background: rgba(226, 68, 92, 0.08);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--color-primary);
    padding: 4px 6px;
    cursor: pointer;
    font-weight: 600;
}
.btn-link:hover {
    text-decoration: underline;
}

.btn-group {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
.btn-group .btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
}
.btn-group .btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}
.icon-btn:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
}

/* ---------- Tabela (Lista) ------------------------------------------------*/
.table-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.task-table {
    width: 100%;
    border-collapse: collapse;
}

.task-table th,
.task-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.task-table thead th {
    background: var(--color-surface-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.task-table tbody tr:last-child td {
    border-bottom: none;
}

.task-table tbody tr:hover {
    background: var(--color-surface-2);
}

.task-table .empty-row td {
    text-align: center;
    color: var(--color-text-soft);
    padding: 32px;
}

.title-cell {
    font-weight: 600;
    color: var(--color-text);
}

.desc-cell {
    color: var(--color-text-muted);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Pills de status -----------------------------------------------*/
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--color-todo);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: var(--color-todo);
}

/* ---------- Kanban --------------------------------------------------------*/
.kanban-board {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-board > .kanban-column {
    flex: 0 0 300px;
}

.kanban-column {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    min-height: 180px;
    box-shadow: var(--shadow-sm);
}

.kanban-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.kanban-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.kanban-header .count {
    margin-left: auto;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.kanban-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
}

.kanban-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.05s;
    box-shadow: var(--shadow-sm);
}
.kanban-card:active {
    cursor: grabbing;
}
.kanban-card:hover {
    box-shadow: var(--shadow-md);
}
.kanban-card .card-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    word-break: break-word;
}
.kanban-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 12px;
}
.kanban-card .card-desc {
    color: var(--color-text-muted);
    font-size: 12px;
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--color-primary-soft) !important;
    border-color: var(--color-primary) !important;
}
.sortable-drag {
    box-shadow: var(--shadow-lg) !important;
    transform: rotate(1.5deg);
}

/* ---------- Modal ---------------------------------------------------------*/
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}

.modal-card {
    position: relative;
    background: var(--color-surface);
    width: min(560px, 92vw);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modal-pop 0.18s ease-out;
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border);
}
.modal-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.modal-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--color-border);
    margin: 8px -22px -18px;
    padding: 14px 22px;
    background: var(--color-surface-2);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.field > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--color-surface);
    font-family: inherit;
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.15);
}
.field textarea {
    resize: vertical;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ---------- Calendário & Gantt --------------------------------------------*/
.calendar-wrapper,
.gantt-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.gantt-wrapper {
    overflow-x: auto;
}

#calendar {
    --fc-button-bg-color: var(--color-primary);
    --fc-button-border-color: var(--color-primary);
    --fc-button-active-bg-color: var(--color-primary-hover);
    --fc-button-active-border-color: var(--color-primary-hover);
    --fc-today-bg-color: var(--color-primary-soft);
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--color-text-muted);
}

/* ---------- Toast ---------------------------------------------------------*/
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1f2937;
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s, transform 0.18s;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast.error {
    background: var(--color-danger);
}

/* ---------- Responsivo ----------------------------------------------------*/
@media (max-width: 960px) {
    .sidebar {
        width: 72px;
    }
    .brand-suffix,
    .nav-item span:last-child,
    .sidebar-footer,
    .user-info {
        display: none;
    }
    .sidebar-user {
        flex-direction: column;
        gap: 6px;
        padding: 10px 8px;
    }
    .brand {
        justify-content: center;
        padding: 14px 8px;
    }
    .brand-logo {
        padding: 4px 6px;
    }
    .nav-item {
        justify-content: center;
    }
    .kanban-board {
        grid-template-columns: 1fr;
    }
    .field-row {
        grid-template-columns: 1fr;
    }
    .content,
    .topbar {
        padding-left: 18px;
        padding-right: 18px;
    }
}

/* ---------- Tela de login -------------------------------------------------*/
.auth-body {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(0, 115, 234, 0.18), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(0, 200, 117, 0.12), transparent 60%),
        var(--color-bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px 28px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-logo img {
    height: 44px;
    width: auto;
    display: block;
}

.auth-logo-suffix {
    color: var(--color-text);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.2px;
}

.auth-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
}

.auth-subtitle {
    margin: 0 0 22px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-submit {
    justify-content: center;
    padding: 11px 14px;
    font-size: 14px;
    margin-top: 4px;
}

.auth-error {
    background: rgba(226, 68, 92, 0.08);
    color: var(--color-danger);
    border: 1px solid rgba(226, 68, 92, 0.25);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-footer-note {
    margin: 22px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--color-text-soft);
}

/* ---------- Dropdown de projeto (topbar) ----------------------------------*/
.project-switcher {
    position: relative;
}

.project-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    max-width: 260px;
}

.project-switcher-btn:hover {
    background: var(--color-surface-2);
}

.project-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.project-caret {
    color: var(--color-text-muted);
    font-size: 11px;
}

.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.project-dot-lg {
    width: 14px;
    height: 14px;
}

.project-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 40;
    max-height: 380px;
    overflow-y: auto;
}

.project-switcher-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}

.project-switcher-item:hover {
    background: var(--color-surface-2);
}

.project-switcher-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
}

.project-switcher-manage {
    display: block;
    margin-top: 4px;
    padding: 8px 10px;
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
}

.project-switcher-manage:hover {
    background: var(--color-surface-2);
}

/* ---------- Página de Projetos --------------------------------------------*/
.projects-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: flex-start;
}

.projects-list-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.projects-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
}

.projects-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
    text-align: left;
    font-weight: 500;
}

.projects-list-item:hover {
    background: var(--color-surface-2);
}

.projects-list-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
}

.projects-list-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-detail {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    min-height: 320px;
}

.project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.project-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-detail-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.project-detail-actions {
    display: flex;
    gap: 8px;
}

.project-statuses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.project-statuses-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.status-drag {
    color: var(--color-text-soft);
    cursor: grab;
    user-select: none;
    font-size: 14px;
}

.status-color-chip {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.status-row-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

/* ---------- Categorias ----------------------------------------------------*/
.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    background: #7a5af8;
    color: #fff;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.category-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    max-height: 160px;
    overflow-y: auto;
}

.category-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px;
    border-radius: 999px;
    opacity: 0.55;
    transition: opacity 120ms ease;
}

.category-option:hover {
    opacity: 0.85;
}

.category-option input[type="checkbox"] {
    margin: 0;
    accent-color: var(--cat-bg, #7a5af8);
}

.category-option:has(input:checked) {
    opacity: 1;
}

/* ---------- Responsáveis (assignees) -------------------------------------*/
.assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px 2px 2px;
    border-radius: 999px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.5;
    max-width: 100%;
}

.assignee-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.assignee-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.assignee-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.assignee-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    max-height: 160px;
    overflow-y: auto;
}

.assignee-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px;
    border-radius: 999px;
    opacity: 0.55;
    transition: opacity 120ms ease;
}

.assignee-option:hover {
    opacity: 0.85;
}

.assignee-option input[type="checkbox"] {
    margin: 0;
    accent-color: var(--color-primary);
}

.assignee-option:has(input:checked) {
    opacity: 1;
}

/* ---------- Filtro do Kanban ---------------------------------------------*/
.kanban-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.kanban-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kanban-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
}

.filter-chip {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-soft);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.filter-chip:hover {
    border-color: var(--cat-bg, #888);
}

.filter-chip.active {
    background: var(--cat-bg, #7a5af8);
    color: var(--cat-fg, #fff);
    border-color: var(--cat-bg, #7a5af8);
}

.filter-chip-uncat {
    --cat-bg: #6b7280;
    --cat-fg: #ffffff;
    border-style: dashed;
}

@media (max-width: 900px) {
    .projects-layout {
        grid-template-columns: 1fr;
    }
}
