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AyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.board-tile {
    position: relative;
    height: 100%;
    padding: 1.25rem;
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    border-top: 4px solid var(--bi-primary);
    border-radius: var(--bi-radius-lg);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.board-tile:hover {
    border-color: var(--bi-primary);
    transform: translateY(-2px);
}

.board-tile:focus-within {
    outline: 2px solid var(--bi-focus);
    outline-offset: 2px;
}

.board-tile-title {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.board-tile-title a {
    color: var(--bi-text);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.board-tile-title a:focus-visible {
    outline: none !important;
}

.board-tile-description {
    margin: 0;
    color: var(--bi-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-tile-fav {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}

.board-tile-handle {
    position: absolute;
    top: 0.75rem;
    right: 3.25rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--bi-text-muted);
    cursor: grab;
}

.board-tile-handle:hover {
    color: var(--bi-primary);
}

.board-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--bi-radius);
    background: var(--bi-primary-soft);
    color: var(--bi-primary);
    font-size: 1.25rem;
}

.board-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.board-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.board-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn.board-toolbar-toggle {
    display: none;
}

#kt_content_container:has(> .lists-container) {
    display: flex;
    flex-direction: column;
    max-width: none;
}

#kt_content_container > .lists-container {
    flex: 1 1 auto;
}

.lists-container {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 1.25rem;
    scroll-snap-type: x proximity;
    scrollbar-width: auto;
    scrollbar-color: auto;
}

.lists-container::-webkit-scrollbar {
    height: 1rem;
}

.lists-container::-webkit-scrollbar-track {
    background-color: var(--bi-surface-muted);
    border-radius: 0.5rem;
}

.lists-container::-webkit-scrollbar-thumb,
.lists-container:hover::-webkit-scrollbar-thumb {
    background-color: var(--bi-border-strong);
    border-radius: 0.5rem;
}

.lists-container.lists-vertical {
    flex-direction: column;
    scroll-snap-type: none;
}

.lists-container.lists-vertical .list-column {
    width: 100%;
}

.lists-container.lists-vertical .cards-container {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.lists-container.lists-vertical .card-tile {
    width: 240px;
    flex: 0 0 auto;
    margin-bottom: 0;
}

.list-column {
    background: var(--bi-surface-muted);
    border: 1px solid var(--bi-border);
    border-radius: 5px 5px var(--bi-radius-lg) var(--bi-radius-lg);
    padding: 1.25rem 0.75rem 0.75rem;
    position: relative;
    width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.list-column-new {
    background: transparent;
    border: 2px dashed var(--bi-border-strong);
    border-radius: var(--bi-radius-lg);
}

.list-column-new .btn {
    justify-content: flex-start;
    text-align: start;
}

.list-column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.125rem 0.125rem 0.6rem;
}

.list-title {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.25rem 0.4rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--bi-text);
    font-weight: 700;
    text-align: start;
    overflow-wrap: anywhere;
}

.list-title:hover {
    background: color-mix(in srgb, var(--bi-text) 8%, transparent);
}

.list-count {
    display: none;
    flex: 0 0 auto;
    min-width: 1.6rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    color: var(--bi-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.list-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.125rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.list-column:hover .list-actions,
.list-column:focus-within .list-actions {
    opacity: 1;
}

@media (hover: none) {
    .list-actions {
        opacity: 1;
    }
}

.list-drag-handle {
    cursor: grab;
}

.list-drag-strip {
    position: absolute;
    top: -1px;
    right: -1px;
    left: -1px;
    height: 12px;
    border-radius: 5px 5px 0 0;
    background: var(--bi-primary);
    transition: background-color 0.15s ease;
}

.list-drag-strip:hover {
    background: var(--bi-primary-hover);
}

.list-column-footer {
    padding: 0.25rem 0 0;
}

.list-column-footer .btn {
    width: 100%;
    justify-content: flex-start;
    text-align: start;
    color: var(--bi-text-muted);
    text-decoration: none;
}

.list-column-footer .btn:hover {
    color: var(--bi-text);
    background: color-mix(in srgb, var(--bi-text) 8%, transparent);
}

.cards-container {
    min-height: 2.5rem;
}

.lists-horizontal .cards-container {
    max-height: calc(100vh - 17rem);
    overflow-y: auto;
    padding: 0.125rem;
}

.card-tile-badge {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: #C2410C;
    color: #fff;
    font-size: 0.7rem;
    box-shadow: 0 0 0 2px var(--bi-surface-muted);
}

.card-tile-badge i {
    color: #fff !important;
}

.card-tile {
    position: relative;
    display: block;
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    border-radius: var(--bi-radius);
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.card-tile:hover {
    border-color: var(--bi-primary);
}

.card-tile-title {
    color: var(--bi-text);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.card-tile-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
}

.card-tile-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
    font-size: 0.85rem;
}

.checklist-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--bi-surface-muted);
    color: var(--bi-text-muted);
    font-weight: 600;
}

.checklist-pill.is-complete {
    background: #DCFCE7;
    color: #166534;
}

[data-bs-theme="dark"] .checklist-pill.is-complete {
    background: #12301F;
    color: #86EFAC;
}

.sortable-ghost {
    opacity: 0.45;
    outline: 2px dashed var(--bi-primary);
    outline-offset: 2px;
    border-radius: var(--bi-radius);
}

.sortable-chosen {
    cursor: grabbing;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 2.25rem;
    max-width: 100%;
    min-height: 1.5rem;
    padding: 0.1rem 0.6rem;
    border: 0;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: -0.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
    font-size: 0.85rem;
    line-height: 1;
}

.label-chip-remove:hover {
    background: rgba(0, 0, 0, 0.35);
}

.label-green { background-color: #15803D; color: #fff; }
.label-yellow { background-color: #FACC15; color: #422006; }
.label-orange { background-color: #C2410C; color: #fff; }
.label-red { background-color: #B91C1C; color: #fff; }
.label-purple { background-color: #6D28D9; color: #fff; }
.label-blue { background-color: #1D4ED8; color: #fff; }
.label-sky { background-color: #0369A1; color: #fff; }
.label-lime { background-color: #A3E635; color: #1A2E05; }

.card-detail-backdrop,
.image-preview-backdrop,
.app-modal-backdrop {
    background: rgba(11, 31, 29, 0.6);
    overflow-y: auto;
}

.card-detail-backdrop .modal-body {
    background: var(--bi-page-bg);
}

.card-section {
    margin-bottom: 1.75rem;
}

.card-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.card-section-title i {
    width: 1.25rem;
    text-align: center;
    color: var(--bi-primary);
}

.checklist-progress {
    height: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    background: var(--bi-surface-muted);
    border: 1px solid var(--bi-border);
    overflow: hidden;
}

.checklist-progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--bi-primary);
    transition: width 0.3s ease;
}

.checklist-progress.is-complete > span {
    background: var(--bi-success);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.4rem;
    border-radius: 0.375rem;
}

.checklist-item:hover {
    background: color-mix(in srgb, var(--bi-text) 6%, transparent);
}

.checklist-item .form-check-input {
    margin: 0;
    flex: 0 0 auto;
}

.checklist-item label {
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.checklist-item.is-done label {
    color: var(--bi-text-muted);
    text-decoration: line-through;
}

.file-picker {
    position: relative;
    display: inline-block;
}

.file-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-picker:focus-within .btn {
    outline: 2px solid var(--bi-focus);
    outline-offset: 2px;
}

.image-preview-content {
    margin: 3rem auto;
    max-width: 90vw;
    text-align: center;
}

.image-preview-content img {
    max-height: 80vh;
    border-radius: var(--bi-radius);
}

.quill-editor-host {
    background: var(--bi-surface);
    color: var(--bi-text);
    min-height: 150px;
    border: 1px solid var(--bi-border-strong);
    border-radius: 0 0 var(--bi-radius) var(--bi-radius);
}

.quill-editor-host .ql-editor {
    min-height: 150px;
}

[data-bs-theme="dark"] .quill-editor-host .ql-toolbar {
    filter: invert(0.85) hue-rotate(180deg);
}

.attachment-row {
    padding: 0.25rem 0;
}

.card-log {
    max-height: 12rem;
    overflow-y: auto;
}

.card-log li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--bi-border);
    font-size: 0.85rem;
}

.card-log li:last-child {
    border-bottom: 0;
}

.attachment-video {
    display: block;
    max-width: 100%;
    max-height: 18rem;
    margin: 0.25rem 0 0.75rem;
    border-radius: 0.375rem;
    background: #000;
}

.attachment-thumb {
    max-width: 60px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
}

.comment-list {
    max-height: 320px;
    overflow-y: auto;
}

.comment-list .card {
    box-shadow: none;
    border: 1px solid var(--bi-border);
}

.comment-fix-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #C2410C;
    color: #fff;
    transition: background-color 0.15s ease;
}

.comment-fix-badge i {
    color: #fff !important;
}

.comment-fix-badge .comment-fix-icon-check {
    display: none;
}

.comment-fix-badge.is-fixed,
.comment-fix-badge.is-todo:hover,
.comment-fix-badge.is-todo:focus-visible {
    background: #15803D;
}

.comment-fix-badge.is-fixed .comment-fix-icon-todo,
.comment-fix-badge.is-todo:hover .comment-fix-icon-todo,
.comment-fix-badge.is-todo:focus-visible .comment-fix-icon-todo {
    display: none;
}

.comment-fix-badge.is-fixed .comment-fix-icon-check,
.comment-fix-badge.is-todo:hover .comment-fix-icon-check,
.comment-fix-badge.is-todo:focus-visible .comment-fix-icon-check {
    display: inline;
}

@media (max-width: 575.98px) {
    .list-column {
        width: 85vw;
    }

    .lists-container {
        scroll-snap-type: x mandatory;
    }

    .board-header {
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .board-toolbar-wrap {
        position: relative;
        flex: 0 0 auto;
    }

    .btn.board-toolbar-toggle {
        display: inline-flex;
    }

    .board-toolbar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1049;
    }

    .board-toolbar {
        display: none;
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        z-index: 1050;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.25rem;
        width: max-content;
        min-width: 12rem;
        padding: 0.5rem;
        background: var(--bi-surface);
        border: 1px solid var(--bi-border);
        border-radius: var(--bi-radius-lg);
        box-shadow: 0 0.5rem 1.5rem rgba(11, 31, 29, 0.2);
    }

    .board-toolbar.is-open {
        display: flex;
    }

    .board-toolbar::before {
        content: "";
        position: absolute;
        top: -6px;
        right: 0.75rem;
        width: 10px;
        height: 10px;
        background: var(--bi-surface);
        border-top: 1px solid var(--bi-border);
        border-left: 1px solid var(--bi-border);
        transform: rotate(45deg);
    }

    .board-toolbar .btn {
        width: 100%;
        justify-content: flex-start;
        text-align: start;
    }

    .board-title {
        font-size: 1.35rem;
    }
}

.note-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    width: 28.8rem;
    max-width: 100%;
    background: var(--bi-surface);
    color: var(--bi-text);
    border-left: 1px solid var(--bi-border);
    box-shadow: -0.5rem 0 1.5rem rgba(11, 31, 29, 0.15);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
}

.note-panel.note-panel-open {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease;
}

.note-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bi-border);
}

.note-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.75rem;
}

.note-textarea {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.6;
}

.note-textarea[readonly] {
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .note-panel {
        width: 100%;
    }
}

.attachment-thumb-button {
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    line-height: 0;
}

.card-header-title {
    flex: 1 1 auto;
    min-width: 0;
}

.card-meta {
    margin-top: 0.1rem;
    color: var(--bi-text-muted);
    font-size: 0.65rem;
    line-height: 1.2;
}

.card-title-button {
    padding: 0.15rem 0.5rem;
    margin-left: -0.5rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    overflow-wrap: anywhere;
}

.card-title-button:hover {
    background: color-mix(in srgb, var(--bi-text) 8%, transparent);
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background: var(--bi-page-bg);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--bi-text);
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-brand i {
    color: var(--bi-primary);
}

.auth-tagline {
    margin: 0.5rem 0 1.75rem;
    color: var(--bi-text-muted);
    text-align: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    background: var(--bi-surface);
    border: 1px solid var(--bi-border);
    border-radius: var(--bi-radius-lg);
}

.auth-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
}

.auth-card.text-center .auth-title {
    margin-bottom: 0.75rem;
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
}

.avatar-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--bi-surface);
    border-radius: 50%;
    background: var(--bi-primary);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.avatar-upload-button:hover {
    background: var(--bi-primary-hover);
}

[data-bs-theme="dark"] .avatar-upload-button {
    color: #0B1F1D;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--bi-border);
    border-radius: var(--bi-radius);
    background: var(--bi-surface);
    color: var(--bi-text);
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.settings-tab:hover {
    border-color: var(--bi-primary);
}

.settings-tab.active {
    background: var(--bi-primary);
    border-color: var(--bi-primary);
    color: #fff;
}

[data-bs-theme="dark"] .settings-tab.active {
    color: #0B1F1D;
}
