.fi-kanban-board {
    position: relative;
    width: 100%;
    min-width: 0;
}

.fi-main.fi-width-full:has(.fi-kanban-board) {
    max-width: none;
    width: 100%;
}

.fi-page:has(.fi-kanban-board) .fi-main,
.fi-page:has(.fi-kanban-board) .fi-page-content {
    max-width: none;
    width: 100%;
}

.fi-kanban-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.fi-kanban-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 18rem;
}

.fi-kanban-search-icon {
    position: absolute;
    inset-inline-start: 0.75rem;
    display: flex;
    color: #a8a29e;
    pointer-events: none;
}

.fi-kanban-search-icon svg,
.fi-kanban-filters-toggle svg,
.fi-kanban-collapse svg,
.fi-kanban-add svg,
.fi-kanban-column-icon,
.fi-kanban-card-icon svg,
.fi-kanban-empty svg {
    width: 1.1rem;
    height: 1.1rem;
}

.fi-kanban-search input {
    width: 100%;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.55rem 0.85rem 0.55rem 2.4rem;
    font-size: 0.875rem;
    color: #1c1917;
    box-shadow: 0 0 0 1px rgb(28 25 23 / 0.1);
}

.fi-kanban-search input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0f766e;
}

.fi-kanban-filters {
    position: relative;
}

.fi-kanban-filters-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
    color: #57534e;
    box-shadow: 0 0 0 1px rgb(28 25 23 / 0.1);
    cursor: pointer;
}

.fi-kanban-filters-toggle.is-active {
    background: #f0fdfa;
    color: #0f766e;
    box-shadow: 0 0 0 1px #99f6e4;
}

.fi-kanban-filters-count {
    position: absolute;
    top: -0.3rem;
    inset-inline-end: -0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

.fi-kanban-filters-panel {
    position: absolute;
    inset-inline-start: 0;
    z-index: 30;
    margin-top: 0.5rem;
    width: min(24rem, calc(100vw - 2rem));
    border-radius: 0.9rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 16px 40px rgb(28 25 23 / 0.12), 0 0 0 1px rgb(28 25 23 / 0.06);
}

.fi-kanban-filters-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.fi-kanban-filters-heading h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1c1917;
}

.fi-kanban-filters-heading button {
    border: 0;
    background: none;
    color: #c2410c;
    font-size: 0.75rem;
    cursor: pointer;
}

.fi-kanban-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgb(255 255 255 / 0.65);
}

.fi-kanban-loading svg {
    width: 2rem;
    height: 2rem;
    color: #0f766e;
}

.fi-kanban-columns {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    min-height: 62vh;
    overflow-x: auto;
    padding-bottom: 0.75rem;
}

.fi-kanban-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 16.5rem;
    max-height: calc(100vh - 13.5rem);
    border: 1px solid #e7e5e4;
    border-radius: 1rem;
    background: #fafaf9;
    box-shadow: 0 1px 0 rgb(28 25 23 / 0.03);
    overflow: hidden;
}

.fi-kanban-column[data-color='info'] {
    border-top: 3px solid #0ea5e9;
}

.fi-kanban-column[data-color='warning'] {
    border-top: 3px solid #e2b93b;
}

.fi-kanban-column[data-color='primary'] {
    border-top: 3px solid #0f766e;
}

.fi-kanban-column[data-color='success'] {
    border-top: 3px solid #14b8a6;
}

.fi-kanban-column[data-color='gray'],
.fi-kanban-column[data-color='danger'] {
    border-top: 3px solid #a8a29e;
}

.fi-kanban-column.is-over-wip {
    box-shadow: 0 0 0 2px rgb(194 65 12 / 0.35);
}

.fi-kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 0.9rem 0.6rem;
}

.fi-kanban-column-title,
.fi-kanban-column-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.fi-kanban-column-title h3 {
    margin: 0;
    overflow: hidden;
    color: #1c1917;
    font-size: 0.9rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-kanban-column-icon {
    width: 1.15rem;
    height: 1.15rem;
    color: #78716c;
    flex-shrink: 0;
}

.fi-kanban-collapse,
.fi-kanban-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: #a8a29e;
    cursor: pointer;
}

.fi-kanban-collapse:hover,
.fi-kanban-add:hover {
    background: rgb(28 25 23 / 0.06);
    color: #44403c;
}

.fi-kanban-column.is-collapsed .fi-kanban-collapse svg {
    transform: rotate(-90deg);
}

.fi-kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #e7e5e4;
    color: #44403c;
    font-size: 0.7rem;
    font-weight: 650;
}

.fi-kanban-column[data-color='info'] .fi-kanban-count {
    background: #e0f2fe;
    color: #0369a1;
}

.fi-kanban-column[data-color='warning'] .fi-kanban-count {
    background: #fef3c7;
    color: #92400e;
}

.fi-kanban-column[data-color='primary'] .fi-kanban-count {
    background: #ccfbf1;
    color: #0f766e;
}

.fi-kanban-column[data-color='success'] .fi-kanban-count {
    background: #ccfbf1;
    color: #0f766e;
}

.fi-kanban-count.is-over-wip {
    background: #ffedd5;
    color: #c2410c;
}

.fi-kanban-column-summary {
    padding: 0 0.9rem 0.4rem;
    color: #78716c;
    font-size: 0.75rem;
}

.fi-kanban-cards {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 4.5rem;
    overflow-y: auto;
    padding: 0.35rem 0.65rem 0.75rem;
}

.fi-kanban-cards::-webkit-scrollbar {
    width: 4px;
}

.fi-kanban-cards::-webkit-scrollbar-thumb {
    background: rgb(28 25 23 / 0.15);
    border-radius: 2px;
}

.fi-kanban-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.5rem 0.75rem;
    color: #a8a29e;
    text-align: center;
}

.fi-kanban-empty p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.fi-kanban-empty span {
    font-size: 0.7rem;
}

.fi-kanban-card {
    position: relative;
    border-radius: 0.8rem;
    background: #fff;
    padding: 0.8rem 0.85rem;
    box-shadow: 0 1px 2px rgb(28 25 23 / 0.06), 0 0 0 1px rgb(28 25 23 / 0.05);
    cursor: grab;
    transform-origin: center center;
}

.fi-kanban-card.is-clickable {
    cursor: pointer;
}

.fi-kanban-card:hover {
    box-shadow: 0 8px 18px rgb(28 25 23 / 0.08), 0 0 0 1px rgb(15 118 110 / 0.16);
}

.fi-kanban-card:active {
    cursor: grabbing;
}

.fi-kanban-card-chosen {
    cursor: grabbing !important;
    transform: scale(1.04) rotate(-1.5deg);
    box-shadow: 0 16px 32px rgb(15 118 110 / 0.18);
}

.fi-kanban-card-drag {
    z-index: 60;
    cursor: grabbing !important;
    box-shadow:
        0 26px 42px rgb(15 118 110 / 0.26),
        0 0 0 1px rgb(15 118 110 / 0.22);
    animation: kanban-card-float 0.85s ease-in-out infinite;
}

.fi-kanban-card-ghost {
    opacity: 0.35 !important;
    box-shadow: none !important;
}

.fi-kanban-card.is-landing {
    z-index: 6;
    animation: kanban-card-land 0.65s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.fi-kanban-card.is-landing::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 1rem;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgb(15 118 110 / 0.45);
    animation: kanban-card-ring 0.65s ease-out;
}

@keyframes kanban-card-float {
    0%,
    100% {
        transform: rotate(4deg) scale(1.06) translateY(0);
    }

    50% {
        transform: rotate(2deg) scale(1.08) translateY(-6px);
    }
}

@keyframes kanban-card-land {
    0% {
        transform: translateY(-12px) scale(0.88) rotate(-4deg);
        box-shadow: 0 22px 36px rgb(15 118 110 / 0.22);
    }

    42% {
        transform: translateY(3px) scale(1.08) rotate(1.5deg);
    }

    68% {
        transform: translateY(-4px) scale(0.98) rotate(-0.6deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(0);
        box-shadow: 0 1px 2px rgb(28 25 23 / 0.06), 0 0 0 1px rgb(28 25 23 / 0.05);
    }
}

@keyframes kanban-card-ring {
    0% {
        box-shadow: 0 0 0 0 rgb(15 118 110 / 0.4);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 0 14px rgb(15 118 110 / 0);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fi-kanban-card-drag,
    .fi-kanban-card.is-landing,
    .fi-kanban-card.is-landing::after {
        animation: none !important;
    }
}

.fi-kanban-card-title {
    color: #1c1917;
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.3;
}

.fi-kanban-card-description {
    margin: 0.3rem 0 0;
    color: #78716c;
    font-size: 0.75rem;
    line-height: 1.4;
}

.fi-kanban-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.55rem;
}

.fi-kanban-card-badges span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f5f5f4;
    padding: 0.12rem 0.5rem;
    color: #57534e;
    font-size: 0.68rem;
    font-weight: 600;
}

.fi-kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f5f5f4;
}

.fi-kanban-card-icon,
.fi-kanban-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    min-height: 1.75rem;
    color: #a8a29e;
}

.fi-kanban-card-icon:hover {
    color: #0f766e;
}

.fi-kanban-card-action .fi-btn,
.fi-kanban-card-action .fi-ac-btn,
.fi-kanban-card-action button {
    min-width: 1.75rem !important;
    min-height: 1.75rem !important;
    padding: 0.2rem !important;
    border-radius: 0.4rem !important;
}

.fi-kanban-card-action .fi-btn-label,
.fi-kanban-card-action .fi-ac-btn-label {
    display: none;
}
