html {
    scroll-behavior: smooth;
}

.field {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(15 23 42);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field:focus {
    border-color: rgb(34 197 94);
    box-shadow: 0 0 0 4px rgb(34 197 94 / 0.12);
}

.label {
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    color: rgb(51 65 85);
}

.side-filter {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.75rem;
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 800;
    color: rgb(71 85 105);
    transition: background 160ms ease, color 160ms ease;
}

.side-filter:hover,
.side-filter.active {
    background: rgb(240 253 244);
    color: rgb(15 23 42);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    color: rgb(71 85 105);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-btn:hover {
    background: rgb(248 250 252);
    border-color: rgb(203 213 225);
    color: rgb(15 23 42);
}

.task-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
}
.task-cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-row-handle { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.task-row-titles { min-width: 0; }
.task-row-owner {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 10px;
}
.priority-stripe {
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: rgb(226 232 240);
    flex-shrink: 0;
}
.priority-stripe-low { background: rgb(148 163 184); }
.priority-stripe-normal { background: rgb(56 189 248); }
.priority-stripe-high { background: rgb(245 158 11); }
.priority-stripe-urgent { background: rgb(225 29 72); }
.task-due-overdue { color: rgb(220 38 38); font-weight: 800; }

.group-control {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 0.1875rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.group-btn {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    color: rgb(100 116 139);
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.group-btn:hover,
.group-btn.active {
    background: rgb(240 253 244);
    color: rgb(15 23 42);
}

.group-btn.active {
    box-shadow: inset 0 0 0 1px rgb(187 247 208);
}

.ai-advisor-card {
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background: linear-gradient(135deg, #fff, #f8fafc);
    padding: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.ai-advisor-section {
    border-radius: 0.875rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 0.875rem;
}

.ai-advisor-section h4 {
    margin-bottom: 0.75rem;
    color: rgb(15 23 42);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ai-advisor-item {
    border-radius: 0.75rem;
    background: rgb(248 250 252);
    padding: 0.75rem;
}

.daily-focus-card {
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.daily-focus-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.daily-focus-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.5rem;
}

.daily-focus-capacity {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgb(100 116 139);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.daily-focus-capacity select {
    width: 4.4rem;
    min-height: 2.25rem;
}

.daily-focus-lanes {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
}

.daily-focus-lane {
    min-width: 0;
    overflow: hidden;
    border-radius: 0.875rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(248 250 252);
    padding: 0.75rem;
}

.daily-focus-lane-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.daily-focus-lane h4 {
    color: rgb(15 23 42);
    font-size: 0.78rem;
    font-weight: 900;
}

.daily-focus-lane p {
    margin-top: 0.1rem;
    color: rgb(100 116 139);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
}

.daily-focus-items {
    min-width: 0;
    margin-top: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.daily-focus-item {
    min-width: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 0.7rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.daily-focus-item:hover,
.daily-focus-item:focus-within {
    border-color: rgb(187 247 208);
    box-shadow: 0 10px 24px rgb(15 23 42 / 0.08);
    transform: translateY(-1px);
}

.daily-focus-item.is-locked {
    border-color: rgb(187 247 208);
    box-shadow: inset 0 0 0 1px rgb(187 247 208);
}

.daily-focus-open {
    min-width: 0;
    border-radius: 0.5rem;
    outline: none;
}

.daily-focus-open:focus-visible {
    box-shadow: 0 0 0 4px rgb(34 197 94 / 0.14);
}

.daily-focus-empty {
    border-radius: 0.75rem;
    border: 1px dashed rgb(203 213 225);
    background: #fff;
    padding: 0.75rem;
    color: rgb(148 163 184) !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-align: center;
}

.daily-focus-collapsed {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.task-row {
    position: relative;
    transform-origin: center;
    cursor: pointer;
    transition:
        background 160ms ease,
        box-shadow 160ms ease,
        margin 180ms ease,
        opacity 160ms ease,
        transform 180ms ease;
}

.task-row:hover {
    background: rgb(248 250 252);
    box-shadow: inset 3px 0 0 rgb(203 213 225);
}

.task-row:hover::after {
    content: "›";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 700;
    color: rgb(148 163 184);
    pointer-events: none;
    line-height: 1;
}

.task-row-active::after,
.task-row.drop-before::after,
.task-row.drop-after::after,
.task-row.drop-nest::after,
.task-row.is-dragging::after {
    content: none !important;
}

.drag-handle:hover,
.task-row-owner:hover,
.task-cell-status select:hover,
.task-cell-due input:hover {
    cursor: pointer;
}

.drag-handle {
    cursor: grab;
    color: rgb(100 116 139);
}

.drag-handle:active {
    cursor: grabbing;
}

.task-drag-active .task-row {
    transition-duration: 150ms;
}

.task-row.is-dragging {
    opacity: 0.38;
    transform: scale(0.985);
}

.drag-preview {
    z-index: 9999;
    overflow: hidden;
    border-radius: 0.875rem;
    border: 1px solid rgb(187 247 208);
    background: #fff;
    box-shadow: 0 18px 45px rgb(15 23 42 / 0.22);
    opacity: 0.94;
    transform: rotate(0.5deg) scale(0.98);
}

.drag-preview .task-inline-control {
    opacity: 0.75;
}

.task-row.drag-over {
    background: rgb(248 250 252);
}

.task-row.drop-before::before,
.task-row.drop-after::after {
    content: "Drop here";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    display: flex;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px dashed rgb(34 197 94);
    background: rgb(240 253 244);
    color: rgb(21 128 61);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgb(34 197 94 / 0.12);
    animation: drop-gap-pop 150ms ease-out;
}

.task-row.drop-before::before {
    top: -2.05rem;
}

.task-row.drop-after::after {
    bottom: -2.05rem;
}

.task-row.drop-before {
    margin-top: 2.1rem;
    transform: translateY(0.08rem);
}

.task-row.drop-after {
    margin-bottom: 2.1rem;
    transform: translateY(-0.08rem);
}

.task-row.drop-nest {
    background: rgb(240 253 244);
    box-shadow: inset 0 0 0 2px rgb(34 197 94 / 0.35), 0 12px 30px rgb(34 197 94 / 0.12);
    transform: translateX(0.55rem) scale(0.992);
}

.task-row.drop-nest::after {
    content: "Make sub-task";
    position: absolute;
    right: 0.8rem;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgb(21 128 61);
    padding: 0.28rem 0.6rem;
    color: white;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 8px 16px rgb(21 128 61 / 0.22);
    animation: nest-cue-pop 150ms ease-out;
}

.task-row.drop-nest .task-cell-main {
    transform: translateX(0.65rem);
    transition: transform 180ms ease;
}

.task-row.drop-commit {
    animation: drop-commit-pulse 260ms ease-out;
}

@keyframes drop-gap-pop {
    from {
        opacity: 0;
        transform: scaleY(0.65);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes nest-cue-pop {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(0.35rem) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

@keyframes drop-commit-pulse {
    0% {
        box-shadow: inset 0 0 0 2px rgb(34 197 94 / 0.35);
    }
    100% {
        box-shadow: inset 0 0 0 0 rgb(34 197 94 / 0);
    }
}

.task-row-done {
    background: rgb(248 250 252);
}

.task-row-done:hover {
    background: rgb(241 245 249);
}

.task-row-done .task-title {
    color: rgb(100 116 139) !important;
}

.task-row-done .badge,
.task-row-done .task-inline-control {
    opacity: 0.68;
}

.task-row-done .task-title {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgb(148 163 184);
}

.task-group-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgb(226 232 240);
    background: rgb(248 250 252);
    padding: 0.65rem 1rem;
    color: rgb(71 85 105);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 160ms ease, margin 180ms ease, opacity 160ms ease, transform 180ms ease;
}

.task-group-header:first-child {
    border-top: 0;
}

.task-group-header.is-collapsed {
    background: rgb(241 245 249);
}

.group-drag-handle {
    cursor: grab;
    color: rgb(100 116 139);
}

.group-drag-handle:active {
    cursor: grabbing;
}

.task-group-header.is-group-dragging {
    opacity: 0.42;
    transform: scale(0.992);
}

.group-drag-preview {
    z-index: 9999;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgb(187 247 208);
    background: #fff;
    box-shadow: 0 16px 38px rgb(15 23 42 / 0.2);
    opacity: 0.96;
    transform: rotate(0.35deg) scale(0.985);
}

.task-group-header.group-drag-over {
    background: rgb(240 253 244);
}

.task-group-header.group-drop-before::before,
.task-group-header.group-drop-after::after {
    content: "Move group here";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    display: flex;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    border: 1px dashed rgb(34 197 94);
    background: rgb(240 253 244);
    color: rgb(21 128 61);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgb(34 197 94 / 0.12);
    animation: drop-gap-pop 150ms ease-out;
}

.task-group-header.group-drop-before {
    margin-top: 1.85rem;
    transform: translateY(0.06rem);
}

.task-group-header.group-drop-before::before {
    top: -1.8rem;
}

.task-group-header.group-drop-after {
    margin-bottom: 1.85rem;
    transform: translateY(-0.06rem);
}

.task-group-header.group-drop-after::after {
    bottom: -1.8rem;
}

.task-group-count {
    margin-left: auto;
    border-radius: 999px;
    background: #fff;
    padding: 0.125rem 0.5rem;
    color: rgb(100 116 139);
    font-size: 0.6875rem;
    box-shadow: inset 0 0 0 1px rgb(226 232 240);
}

.task-inline-control {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 900;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.task-inline-control:hover,
.task-inline-control:focus {
    border-color: rgb(187 247 208);
    box-shadow: 0 0 0 3px rgb(34 197 94 / 0.12);
}

.task-inline-owner,
.task-inline-date {
    border-color: rgb(226 232 240);
    background: rgb(248 250 252);
    color: rgb(51 65 85);
}

.task-inline-date {
    padding-right: 0.35rem;
}

.task-inline-control.is-saving {
    opacity: 0.55;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgb(15 23 42 / 0.52);
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-panel {
    width: 100%;
    max-height: min(92vh, 900px);
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    box-shadow: 0 30px 80px rgb(15 23 42 / 0.25);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgb(226 232 240);
    padding: 1rem 1.25rem;
}

.notification-badge {
    position: absolute;
    right: -0.25rem;
    top: -0.25rem;
    min-width: 1.1rem;
    border-radius: 999px;
    background: rgb(225 29 72);
    padding: 0.05rem 0.3rem;
    color: white;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1rem;
}

.paste-zone {
    border: 1px dashed rgb(148 163 184);
    background: rgb(248 250 252);
}

.paste-zone:focus-within,
.paste-zone:hover {
    border-color: rgb(34 197 94);
    background: rgb(240 253 244);
}

.mention-composer {
    position: relative;
}

.mention-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 30;
    max-height: 16rem;
    overflow-y: auto;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    padding: 0.25rem;
    box-shadow: 0 18px 45px rgb(15 23 42 / 0.16);
}

.mention-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.625rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
    transition: background 160ms ease;
}

.mention-option:hover,
.mention-option.active {
    background: rgb(240 253 244);
}

.mention-avatar {
    width: 0.7rem;
    height: 0.7rem;
    flex-shrink: 0;
    border-radius: 999px;
}

.comment-mention {
    display: inline-flex;
    align-items: center;
    border-radius: 0.375rem;
    background: rgb(220 252 231);
    padding: 0 0.25rem;
    color: rgb(21 128 61);
    font-weight: 900;
}

.settings-record-list {
    max-height: min(60vh, 590px);
    overflow-y: auto;
}

.mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

@media (max-width: 1024px) {
    .task-grid.task-header {
        letter-spacing: 0.08em;
    }

    .badge {
        padding-inline: 0.45rem;
    }
}

@media (max-width: 767px) {
    .daily-focus-card {
        padding: 0.85rem;
    }

    .daily-focus-head {
        display: grid;
        gap: 0.8rem;
    }

    .daily-focus-actions {
        width: 100%;
        justify-content: space-between;
    }

    .daily-focus-capacity {
        flex: 1 1 auto;
    }

    .daily-focus-capacity select {
        flex: 1 1 auto;
        max-width: 7rem;
    }

    .daily-focus-lanes {
        grid-template-columns: minmax(0, 1fr);
    }

    .daily-focus-lane {
        padding: 0.7rem;
    }

    .daily-focus-item {
        padding: 0.7rem;
    }

    .filter-grid {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .filter-search {
        grid-column: 1 / 2 !important;
    }

    .mobile-filter-toggle {
        display: inline-flex;
    }

    .filter-extra {
        display: none;
        grid-column: 1 / -1;
    }

    .filter-grid.mobile-filters-open .filter-extra {
        display: block;
    }

    .filter-grid.mobile-filters-open #clearFiltersBtn {
        display: inline-flex;
        justify-content: center;
    }

    .task-board {
        min-width: 0 !important;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .task-header {
        display: none;
    }

    #taskRows {
        display: grid;
        gap: 0.75rem;
    }

    .task-row.task-grid {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem;
        align-items: start;
        border: 1px solid rgb(226 232 240);
        border-left-width: 4px;
        border-radius: 1rem;
        background: #fff;
        padding: 1rem;
        box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    }

    .task-row {
        cursor: default;
    }

    .task-row:hover {
        background: #fff;
    }

    .task-cell-main {
        grid-column: 1 / -1;
    }

    .task-cell-status,
    .task-cell-owner,
    .task-cell-due {
        min-width: 0;
    }

    .task-cell-due {
        justify-self: end;
    }
}

.task-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(15 23 42 / 0.18);
    z-index: 40;
}

.task-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 945px;
    max-width: 100vw;
    background: #fff;
    border-left: 4px solid #22c55e;
    box-shadow: -16px 0 32px rgb(15 23 42 / 0.12);
    display: flex;
    flex-direction: column;
    z-index: 41;
    transform: translateX(0);
    transition: transform 220ms ease;
}

.task-drawer.is-closed {
    transform: translateX(105%);
    pointer-events: none;
}

.task-drawer-backdrop.is-closed {
    display: none;
}

.task-drawer-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgb(226 232 240);
    flex-shrink: 0;
    position: relative;
}

.task-drawer-tabs {
    display: flex;
    background: rgb(250 250 250);
    border-bottom: 1px solid rgb(226 232 240);
    padding: 0 12px;
    overflow-x: auto;
    flex-shrink: 0;
}

.task-drawer-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 18px 18px;
}

@media (max-width: 1023px) {
    .task-drawer {
        width: 100vw;
        border-left: none;
    }

    .task-drawer-pills { gap: 4px; }
    .drawer-pill { font-size: 10px; padding: 3px 8px; }
    .task-drawer-tab { padding: 8px 10px; font-size: 11px; }
    .task-drawer-header { padding: 12px 14px 10px; }
    .task-drawer-body { padding: 12px 14px 16px; }
}

.task-drawer-loading {
    padding: 14px 18px;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgb(148 163 184);
}

.task-drawer-head-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.task-drawer-head-titles {
    flex: 1;
    min-width: 0;
}

.task-drawer-eyebrow {
    font-size: 11px;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.task-drawer-title {
    font-size: 1.125rem;
    font-weight: 900;
    color: rgb(15 23 42);
    line-height: 1.25;
    margin-top: 2px;
    cursor: text;
    border-radius: 6px;
    padding: 2px 4px;
    margin-left: -4px;
}

.task-drawer-title:hover,
.task-drawer-title:focus {
    background: rgb(248 250 252);
    outline: none;
}

.task-drawer-head-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.task-drawer-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.drawer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    color: rgb(15 23 42);
}

.drawer-pill select,
.drawer-pill input {
    border: none;
    background: transparent;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    padding: 0;
    cursor: pointer;
}

.drawer-pill select:focus,
.drawer-pill input:focus {
    outline: none;
}

.drawer-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.drawer-pill-in-progress { background: rgb(220 252 231); color: rgb(21 128 61); border-color: rgb(187 247 208); }
.drawer-pill-ready { background: #fff; color: rgb(15 23 42); }
.drawer-pill-backlog { background: rgb(241 245 249); color: rgb(71 85 105); }
.drawer-pill-needs-review { background: rgb(219 234 254); color: rgb(29 78 216); border-color: rgb(191 219 254); }
.drawer-pill-waiting { background: rgb(254 243 199); color: rgb(146 64 14); border-color: rgb(253 230 138); }
.drawer-pill-done { background: rgb(241 245 249); color: rgb(100 116 139); border-color: rgb(226 232 240); }

.drawer-pill-priority-low { background: rgb(241 245 249); color: rgb(71 85 105); }
.drawer-pill-priority-normal { background: rgb(224 242 254); color: rgb(7 89 133); border-color: rgb(186 230 253); }
.drawer-pill-priority-high { background: rgb(254 243 199); color: rgb(146 64 14); border-color: rgb(253 230 138); }
.drawer-pill-priority-urgent { background: rgb(254 226 226); color: rgb(159 18 57); border-color: rgb(254 202 202); }

.drawer-pill-neutral { background: #fff; color: rgb(15 23 42); }

.task-drawer-description {
    margin-top: 14px;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: text;
}

.task-drawer-description:hover,
.task-drawer-description:focus {
    background: #fff;
    border-color: rgb(34 197 94);
    outline: none;
}

.task-drawer-section-label {
    font-size: 9px;
    font-weight: 800;
    color: rgb(100 116 139);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.task-drawer-description-text {
    color: rgb(51 65 85);
    line-height: 1.55;
    white-space: pre-wrap;
}

.task-drawer-title-input {
    width: 100%;
    font-size: 1.125rem;
    font-weight: 900;
    color: rgb(15 23 42);
    border: 1px solid rgb(34 197 94);
    border-radius: 6px;
    padding: 4px 6px;
    margin-left: -6px;
    background: #fff;
    outline: none;
}

.task-drawer-description-textarea {
    width: 100%;
    border: 1px solid rgb(34 197 94);
    border-radius: 6px;
    padding: 6px 8px;
    background: #fff;
    color: rgb(51 65 85);
    line-height: 1.55;
    outline: none;
    resize: vertical;
    font-family: inherit;
    font-size: 0.875rem;
}

.task-drawer-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    color: rgb(100 116 139);
    font-weight: 700;
    font-size: 12px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    background: transparent;
}

.task-drawer-tab:hover {
    color: rgb(15 23 42);
}

.task-drawer-tab.is-active {
    color: rgb(15 23 42);
    font-weight: 800;
    border-bottom-color: rgb(34 197 94);
}

.task-drawer-tab-count {
    background: rgb(15 23 42);
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    margin-left: 2px;
}

.task-drawer-tab.is-active .task-drawer-tab-count {
    background: rgb(34 197 94);
}

.task-drawer-subtask {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    margin-bottom: 6px;
    transition: background 160ms ease, border-color 160ms ease;
}

.task-drawer-subtask:hover {
    background: rgb(240 253 244);
    border-color: rgb(187 247 208);
}

.task-drawer-subtask-title {
    font-weight: 700;
    color: rgb(15 23 42);
}

.task-drawer-subtask-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.task-drawer-subtask-owner {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 10px;
}

.task-drawer-files {
    display: grid;
    gap: 6px;
    border-radius: 12px;
    padding: 4px;
    transition: background 160ms ease;
}

.task-drawer-files.paste-active {
    background: rgb(240 253 244);
}

.task-drawer-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
    background: #fff;
}

.task-drawer-file-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.task-drawer-settings { display: grid; gap: 14px; }
.task-drawer-settings-row { display: grid; gap: 4px; }
.task-drawer-watchers { display: grid; gap: 6px; }
.task-drawer-watcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
    background: #fff;
}
.task-drawer-watcher span:first-of-type {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 10px;
}
.task-drawer-activity { display: grid; gap: 8px; padding: 0; list-style: none; }
.task-drawer-activity-item {
    border-left: 2px solid rgb(226 232 240);
    padding: 4px 0 4px 12px;
}
.task-drawer-activity-meta { display: flex; align-items: center; justify-content: space-between; }

.task-drawer-overflow {
    position: absolute;
    right: 18px;
    top: 56px;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgb(15 23 42 / 0.12);
    padding: 6px;
    min-width: 220px;
    z-index: 50;
    display: grid;
    gap: 2px;
}

.task-drawer-overflow.is-closed {
    display: none;
}

.overflow-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: rgb(15 23 42);
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    width: 100%;
}

.overflow-item:hover { background: rgb(248 250 252); }
.overflow-danger { color: rgb(225 29 72); }
.overflow-danger:hover { background: rgb(254 226 226); }

.task-row-active {
    background: rgb(240 253 244) !important;
    box-shadow: inset 3px 0 0 rgb(34 197 94);
}

/* Conversation tab — embedded checklist + files sections */
.conversation-section {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 10px;
}

.conversation-section:first-child {
    margin-top: 0;
}

.conversation-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: rgb(71 85 105);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.conversation-section-count {
    background: #fff;
    color: rgb(71 85 105);
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.conversation-attach-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 6px;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 999px;
    color: rgb(15 23 42);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    text-transform: none;
    letter-spacing: 0;
}

.conversation-attach-btn:hover {
    background: rgb(240 253 244);
    border-color: rgb(187 247 208);
    color: rgb(21 128 61);
}

.conversation-checklist {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

.conversation-checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgb(241 245 249);
}

.conversation-checklist-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.conversation-row-delete {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    color: rgb(148 163 184);
    background: transparent;
    flex-shrink: 0;
    transition: background 120ms ease, color 120ms ease;
}

.conversation-row-delete:hover {
    background: rgb(254 226 226);
    color: rgb(225 29 72);
}

.conversation-add-row {
    display: flex;
    gap: 6px;
}

.conversation-add-row .field-compact {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
}

.conversation-add-btn {
    padding: 5px 12px;
    background: rgb(15 23 42);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 8px;
    transition: background 160ms ease;
    flex-shrink: 0;
}

.conversation-add-btn:hover {
    background: rgb(30 41 59);
}

.file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px 2px 8px;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 999px;
    max-width: 240px;
    font-size: 11px;
    font-weight: 700;
    transition: border-color 160ms ease;
}

.file-chip:hover {
    border-color: rgb(34 197 94);
}

.file-chip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgb(15 23 42);
    min-width: 0;
    text-decoration: none;
}

.file-chip-link:hover .file-chip-name {
    color: rgb(21 128 61);
}

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

.conversation-empty-line {
    font-size: 11px;
    color: rgb(148 163 184);
    font-weight: 600;
    margin: 0;
}
