body {
    background-color: #15171a;
}

.sidebar {
    background-color: #1c1f23 !important;
}

@media (min-width: 768px) {
    .sidebar {
        position: sticky !important;
        top: 56px !important;
        height: calc(100vh - 56px) !important;
        width: 260px !important;
        flex-shrink: 0;
        overflow: hidden;
    }
    .sidebar .offcanvas-body {
        height: 100%;
        overflow-y: auto;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        width: 280px !important;
    }
}

.navbar {
    background-color: #1c1f23 !important;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.board-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.board-column {
    background-color: #1c1f23;
    border: 1px solid #2c2f33;
    border-radius: 0.5rem;
    min-width: 320px;
    max-width: 380px;
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

@media (max-width: 767.98px) {
    .board-wrapper {
        flex-direction: column;
        overflow-x: hidden;
        width: 100%;
    }

    .board-column {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        flex: none;
        max-height: none;
    }

    .board-column-body {
        max-height: 50vh;
    }

    .board-column-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

.board-column-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2c2f33;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* Column drag (manager only) — alleen de naam is de handle, niet de hele header */
[data-can-manage="1"] .column-drag-handle {
    cursor: grab;
    user-select: none;
}
[data-can-manage="1"] .column-drag-handle:active {
    cursor: grabbing;
}

.board-column-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 60px;
}

.task-card {
    background-color: #25282c;
    border: 1px solid #33373c;
    border-radius: 0.4rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    cursor: default;
}

.task-card[data-bs-toggle="modal"] {
    cursor: pointer;
}

/* SortableJS drag states (cards en kolommen) */
.sortable-ghost {
    opacity: 0.35;
}
.sortable-fallback {
    opacity: 0.9;
    cursor: grabbing !important;
}

.task-delete-btn {
    background: none;
    border: none;
    padding: 0;
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    cursor: pointer;
}
.task-card:hover .task-delete-btn {
    opacity: 1;
}
.task-delete-btn:hover {
    color: #dc3545;
}

.task-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    border: 1.5px solid #3d4147;
    font-size: 0.6rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0;
}
.task-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.task-avatar-me {
    color: #0d6efd;
    border-color: #0d6efd;
}
.task-avatar-me i {
    font-size: 0.75rem;
}

.add-column-card {
    min-width: 220px;
}

.project-card {
    background-color: #1c1f23;
    border: 1px solid #2c2f33;
    transition: border-color 0.15s ease;
}

.project-card:hover {
    border-color: #495057;
}

.sidebar-project-list {
    overflow-y: auto;
    max-height: 40vh;
}

.activity-log-card {
    overflow: hidden;
}
.activity-log-list {
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3d4147 transparent;
}
.activity-log-list::-webkit-scrollbar { width: 6px; }
.activity-log-list::-webkit-scrollbar-track { background: transparent; }
.activity-log-list::-webkit-scrollbar-thumb { background: #3d4147; border-radius: 3px; }

.members-list {
    max-height: 40vh;
    overflow-y: auto;
}

/* ── Task detail modal ── */
.task-title-input {
    border-radius: 0;
}
.task-title-input:focus {
    outline: none;
    border-bottom: 1px solid #495057 !important;
}

.task-section-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #6c757d;
}

/* Description textarea — looks like plain text until focused */
.task-desc-field {
    background: transparent;
    border: none;
    border-radius: 0;
    color: #cfd3d8;
    resize: vertical;
    padding: 0;
    line-height: 1.6;
    font-size: 0.9rem;
}
.task-desc-field:focus {
    outline: none;
    box-shadow: none;
    color: #e9ecef;
}
.task-desc-field::placeholder {
    color: #495057;
}
.task-desc-field:disabled {
    background: transparent;
    color: #6c757d;
    cursor: default;
}

/* Meta sidebar sections */
.task-meta-section {
    background-color: #1c1f23;
    border: 1px solid #2c2f33;
    border-radius: 0.4rem;
    padding: 0.55rem 0.7rem;
}

.task-meta-section[draggable="true"] {
    opacity: 0.8;
    cursor: grabbing;
}

.task-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-drag-handle {
    cursor: grab;
    font-size: 1rem;
    color: #495057;
    transition: color 0.15s;
    line-height: 1;
}
.task-drag-handle:hover { color: #adb5bd; }

.meta-section-dragging {
    opacity: 0.35;
    border-style: dashed;
}

/* Status select */
.task-status-select { font-weight: 500; }
.task-status-select.status-in-progress { border-color: #0d6efd !important; color: #6ea8fe; }
.task-status-select.status-on-hold     { border-color: #ffc107 !important; color: #ffc107; }
.task-status-select.status-complete    { border-color: #198754 !important; color: #75b798; }

/* Custom fields */
.custom-field-row {
    background-color: #1c1f23;
    border: 1px solid #2c2f33;
    border-radius: 0.3rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.875rem;
}
.custom-field-name {
    min-width: 80px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Notes */
.task-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 240px;
    overflow-y: auto;
}
.task-note-item {
    background-color: #1c1f23;
    border: 1px solid #2c2f33;
    border-radius: 0.35rem;
    padding: 0.4rem 0.6rem;
}
.task-note-meta {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}
.task-note-meta .note-author {
    font-size: 0.8rem;
}
.task-note-meta .note-time {
    font-size: 0.72rem;
}
.note-body {
    color: #cfd3d8;
    white-space: pre-wrap;
}
