html.dark {
    color-scheme: dark;
}

html.dark .bg-white {
    background-color: #0f172a;
}

html.dark .bg-slate-50 {
    background-color: #1e293b;
}

html.dark .bg-slate-100 {
    background-color: #020617;
}

html.dark .text-slate-900 {
    color: #f1f5f9;
}

html.dark .text-slate-800 {
    color: #e2e8f0;
}

html.dark .text-slate-700 {
    color: #cbd5e1;
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
    color: #94a3b8;
}

html.dark .border-slate-200 {
    border-color: #334155;
}

html.dark .border-slate-300 {
    border-color: #475569;
}

html.dark .hover\:bg-slate-50:hover {
    background-color: #1e293b;
}

html.dark .hover\:bg-rose-50:hover {
    background-color: rgb(136 19 55 / 0.4);
}

html.dark .hover\:bg-indigo-50:hover {
    background-color: rgb(49 46 129 / 0.4);
}

html.dark .bg-indigo-50 {
    background-color: rgb(49 46 129 / 0.35);
}

html.dark .bg-cyan-50 {
    background-color: rgb(21 94 117 / 0.35);
}

html.dark .bg-violet-50 {
    background-color: rgb(76 29 149 / 0.35);
}

html.dark .bg-rose-50 {
    background-color: rgb(136 19 55 / 0.35);
}

html.dark .bg-amber-50 {
    background-color: rgb(120 53 15 / 0.4);
}

html.dark .bg-emerald-50 {
    background-color: rgb(6 78 59 / 0.35);
}

html.dark .border-indigo-200 {
    border-color: #4338ca;
}

html.dark .border-cyan-200 {
    border-color: #0e7490;
}

html.dark .border-violet-200 {
    border-color: #6d28d9;
}

html.dark .border-rose-200 {
    border-color: #be123c;
}

html.dark .border-amber-200,
html.dark .border-amber-300 {
    border-color: #b45309;
}

html.dark .text-indigo-950,
html.dark .text-cyan-950,
html.dark .text-violet-950,
html.dark .text-emerald-950 {
    color: #e0e7ff;
}

html.dark .text-emerald-900,
html.dark .text-emerald-800,
html.dark .text-emerald-700 {
    color: #a7f3d0;
}

html.dark .text-teal-800,
html.dark .text-teal-700 {
    color: #99f6e4;
}

html.dark .text-rose-800,
html.dark .text-rose-700 {
    color: #fecdd3;
}

html.dark .text-amber-800,
html.dark .text-amber-700 {
    color: #fde68a;
}

html.dark .text-indigo-900,
html.dark .text-indigo-800,
html.dark .text-indigo-700,
html.dark .text-indigo-600 {
    color: #a5b4fc;
}

html.dark .text-cyan-900,
html.dark .text-cyan-800,
html.dark .text-cyan-700 {
    color: #a5f3fc;
}

html.dark .text-violet-900,
html.dark .text-violet-800,
html.dark .text-violet-700,
html.dark .text-violet-600 {
    color: #c4b5fd;
}

html.dark .bg-teal-50,
html.dark .bg-teal-100 {
    background-color: rgb(19 78 74 / 0.45);
}

html.dark .border-teal-300,
html.dark .border-teal-200 {
    border-color: #0f766e;
}

html.dark .border-emerald-200 {
    border-color: #059669;
}

html.dark .ring-offset-2 {
    --tw-ring-offset-color: #020617;
}

html.dark [data-theme-toggle] {
    border-color: #475569;
    color: #e2e8f0;
}

html.dark [data-theme-toggle]:hover {
    background-color: #1e293b;
}

html.dark input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
html.dark select,
html.dark textarea {
    background-color: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #94a3b8;
}

.rich-textarea-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.rich-textarea-preview-toggle {
    cursor: pointer;
    border: 0;
    border-radius: 0.375rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1rem;
    padding: 0.2rem 0.5rem;
}

.rich-textarea trix-toolbar {
    display: block;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.2rem 0.35rem;
}

.rich-textarea trix-toolbar .trix-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
}

.rich-textarea trix-toolbar .trix-button-group {
    margin: 0 !important;
    border-radius: 0.25rem;
    overflow: hidden;
}

.rich-textarea trix-toolbar .trix-button {
    height: 1.65rem !important;
    min-width: 1.65rem !important;
    width: auto !important;
    padding: 0 0.3rem !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
}

.rich-textarea trix-toolbar .trix-button--icon {
    width: 1.65rem !important;
    height: 1.65rem !important;
}

.rich-textarea trix-toolbar .trix-button--icon::before {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    background-size: 1.05rem !important;
    background-position: center !important;
}

.rich-textarea .rg-trix-extras {
    margin-left: 0 !important;
    gap: 0.2rem;
}

.rich-textarea .rg-trix-select,
.rich-textarea .rg-trix-color,
.rich-textarea .rg-trix-align {
    height: 1.65rem !important;
    min-height: 1.65rem !important;
}

.rich-textarea .rg-trix-select {
    min-width: 3.5rem;
    font-size: 0.6875rem;
    padding: 0 0.25rem;
}

.rich-textarea .rg-trix-color {
    width: 1.65rem !important;
}

.rich-textarea .rg-trix-align {
    min-width: 2.75rem !important;
    padding: 0 0.3rem !important;
    font-size: 0.65rem !important;
}

.rich-textarea-compact .rich-textarea-preview,
.rich-textarea-compact trix-editor {
    min-height: 6.5rem;
}

.rich-textarea-preview-toggle:hover {
    background: #4338ca;
}

.rich-textarea.is-previewing .rich-textarea-preview-toggle {
    background: #475569;
}

.rich-textarea.is-previewing .rich-textarea-preview-toggle:hover {
    background: #334155;
}

.rich-textarea.is-previewing trix-toolbar,
.rich-textarea.is-previewing trix-editor {
    display: none !important;
}

.rich-textarea-preview {
    min-height: 10rem;
    padding: 0.75rem;
}

.rich-textarea-preview-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

html.dark .rich-textarea-bar {
    background: #1e293b;
    border-bottom-color: #334155;
}

html.dark .rich-textarea-preview-empty {
    color: #94a3b8;
}

html.dark .rich-textarea {
    background: #0f172a;
    border-color: #475569;
}

html.dark .rich-textarea trix-toolbar {
    background: #1e293b;
    border-bottom-color: #334155;
}

html.dark trix-toolbar .trix-button-group {
    border-color: #475569;
}

html.dark trix-toolbar .trix-button {
    color: #e2e8f0;
    border-bottom-color: #475569;
    background: transparent;
}

html.dark trix-toolbar .trix-button:not(:first-child) {
    border-left-color: #475569;
}

html.dark trix-toolbar .trix-button:disabled {
    color: rgb(226 232 240 / 0.35);
}

html.dark trix-toolbar .trix-button.trix-active {
    background: #312e81;
    color: #e0e7ff;
}

html.dark trix-toolbar .trix-button--icon::before {
    filter: invert(1) brightness(1.35);
    opacity: 0.9;
}

html.dark trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1;
}

html.dark trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.3;
}

html.dark .rg-trix-align {
    color: #e2e8f0 !important;
}

html.dark trix-toolbar .trix-dialog {
    background: #0f172a;
    color: #e2e8f0;
    border-top-color: #6366f1;
    box-shadow: 0 0.3em 1em rgb(0 0 0 / 0.55);
}

html.dark trix-toolbar .trix-input--dialog {
    background-color: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

html.dark trix-toolbar .trix-button--dialog {
    color: #e2e8f0;
    border-color: #475569;
}

.rg-trix-extras {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
}

.rg-trix-select {
    height: 1.75rem;
    min-width: 4.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.75rem;
    padding: 0 0.35rem;
}

.rg-trix-color {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #fff;
    cursor: pointer;
}

.rg-trix-align {
    min-width: 3.25rem !important;
    height: 1.75rem !important;
    padding: 0 0.4rem !important;
    font-size: 0.7rem !important;
    font-weight: 600;
    line-height: 1 !important;
}

.trix-content span[style*='text-align'],
.rich-content span[style*='text-align'],
.rich-textarea-preview span[style*='text-align'] {
    display: block;
    width: 100%;
}

html.dark .rg-trix-select,
html.dark .rg-trix-color {
    border-color: #475569;
    background: #0f172a;
    color: #e2e8f0;
}

html.dark .rich-textarea trix-editor {
    background: #0f172a;
    color: #e2e8f0;
}

html.dark .rich-textarea trix-editor:empty:not(:focus)::before {
    color: #64748b;
}

html.dark .rich-content-prose,
html.dark .rich-content {
    color: #e2e8f0;
}

html.dark .rich-content-prose :where(strong, b) {
    color: #f8fafc;
}

html.dark .rich-content-prose :where(code, pre) {
    background: #1e293b;
}

html.dark .rich-content :where(blockquote) {
    border-left-color: #475569;
    color: #cbd5e1;
}

html.dark .swal2-popup {
    background: #0f172a;
    color: #e2e8f0;
}

.feature-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14rem;
    align-items: start;
    gap: 1rem;
    scroll-margin-top: 1.25rem;
}

.feature-task-card-no-actions {
    grid-template-columns: minmax(0, 1fr);
}

.feature-task-card-running {
    grid-template-columns: minmax(0, 1fr) 16rem;
}

.feature-task-running-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 0.15rem 0 0;
    padding: 0.85rem 0.4rem;
    border-radius: 0.75rem;
    background: #eef2ff;
    color: #312e81;
    text-align: center;
}

.feature-task-running-timer-caption {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.feature-task-running-timer-value {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}

.feature-task-paused-time {
    position: relative;
    background: #fffbeb;
    color: #92400e;
}

.feature-task-paused-flash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    color: #b45309;
    background: rgb(255 251 235 / 0.88);
    pointer-events: none;
    animation: feature-task-paused-flash 1.1s linear infinite;
}

@keyframes feature-task-paused-flash {
    0%, 49% {
        opacity: 1;
    }

    50%, 100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-task-paused-flash {
        animation: none;
    }
}

html.dark .feature-task-running-timer {
    background: rgb(49 46 129 / 0.45);
    color: #e0e7ff;
}

html.dark .feature-task-paused-time {
    background: rgb(120 53 15 / 0.45);
    color: #fde68a;
}

html.dark .feature-task-paused-flash {
    color: #fbbf24;
    background: rgb(69 26 3 / 0.82);
}

li.feature-task-done {
    scroll-margin-top: 1.25rem;
    overflow: hidden;
    background: #ffffff;
    border-color: #cbd5e1;
}

li.feature-task-done-alt {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.feature-task-done-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: inherit;
    list-style: none;
    cursor: pointer;
    border-radius: 0.5rem;
}

.feature-task-done-summary::-webkit-details-marker {
    display: none;
}

.feature-task-done-summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    justify-self: end;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-0.12rem);
}

.feature-task-done-panel[open] > .feature-task-done-summary {
    border-radius: 0.5rem 0.5rem 0 0;
}

.feature-task-done-panel[open] > .feature-task-done-summary::after {
    transform: rotate(-135deg) translateY(-0.05rem);
}

.feature-task-done-summary:hover {
    background: rgb(15 23 42 / 0.06);
}

.timeline-milestone > .timeline-milestone-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    list-style: none;
    cursor: pointer;
}

.timeline-milestone > .timeline-milestone-summary::-webkit-details-marker {
    display: none;
}

.timeline-milestone > .timeline-milestone-summary::after {
    content: "";
    flex: 0 0 auto;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-0.12rem);
}

.timeline-milestone[open] > .timeline-milestone-summary::after {
    transform: rotate(-135deg) translateY(-0.05rem);
}

.feature-task-done-heading {
    display: block;
    min-width: 0;
}

.feature-task-title {
    margin: 0;
}

.feature-task-done-body {
    padding: 0 0.75rem 0.75rem;
}

html.dark li.feature-task-done {
    background: rgb(15 23 42 / 0.55);
    border-color: #334155;
}

html.dark li.feature-task-done-alt {
    background: rgb(49 46 129 / 0.45);
    border-color: #4338ca;
}

li.feature-task-status {
    border-width: 2px;
}

li.feature-task-status-todo {
    border-color: #64748b;
}

li.feature-task-status-in_progress {
    border-color: #4f46e5;
}

li.feature-task-status-paused {
    border-color: #d97706;
}

li.feature-task-status-ready_for_test {
    border-color: #7c3aed;
}

li.feature-task-status-done {
    border-color: #059669;
}

html.dark li.feature-task-status-todo {
    border-color: #94a3b8;
}

li.feature-bug-card,
.bug-detail-card {
    border-width: 2px;
    border-style: solid;
    border-color: #64748b;
}

.bug-detail-card {
    background: #fff;
}

.bug-detail-card .feature-task-card-actions form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bug-detail-card .feature-task-card-actions > button,
.bug-detail-card .feature-task-card-actions form button {
    width: 100%;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-fix {
    border: 0;
    background: #7c3aed;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-fix:hover {
    background: #6d28d9;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-close {
    border: 0;
    background: #059669;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-close:hover {
    background: #047857;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-reopen {
    border: 0;
    background: #d97706;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-reopen:hover {
    background: #b45309;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-reject {
    border: 0;
    background: #e11d48;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-reject:hover {
    background: #be123c;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-convert {
    border: 0;
    background: #0284c7;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-convert:hover {
    background: #0369a1;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-convert:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-start {
    border: 0;
    background: #4f46e5;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-start:hover {
    background: #4338ca;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-defer {
    border: 0;
    background: #334155;
    color: #fff;
    font-weight: 700;
}

.bug-detail-card .feature-task-card-actions button.bug-detail-action-defer:hover {
    background: #1e293b;
}

.bug-linked-feature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.65rem;
    border: 2px solid #0284c7;
    border-radius: 0.5rem;
    background: #f0f9ff;
    padding: 0.55rem 0.7rem;
}

.bug-linked-feature-empty {
    border-color: #94a3b8;
    background: #f8fafc;
}

.bug-linked-feature-kicker,
.bug-linked-feature-missing {
    margin: 0;
}

.bug-linked-feature-kicker {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0369a1;
}

.bug-linked-feature-empty .bug-linked-feature-kicker {
    color: #64748b;
}

.bug-linked-feature-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0c4a6e;
}

.bug-linked-feature-title:hover {
    text-decoration: underline;
}

.bug-linked-feature-stage {
    border-radius: 9999px;
    background: #0284c7;
    padding: 0.1rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}

.bug-linked-feature-missing {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.bug-sentry-link {
    display: inline-block;
    margin: 0 0 0.65rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #4338ca;
}

.bug-sentry-link:hover {
    text-decoration: underline;
}

html.dark .bug-sentry-link {
    color: #a5b4fc;
}

.bug-id-copy {
    cursor: pointer;
    border: 0;
    border-radius: 0.5rem;
    background: #4f46e5;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
}

.bug-id-copy:hover {
    background: #4338ca;
}

html.dark .bug-linked-feature {
    border-color: #38bdf8;
    background: rgb(7 89 133 / 0.35);
}

html.dark .bug-linked-feature-kicker,
html.dark .bug-linked-feature-title {
    color: #e0f2fe;
}

html.dark .bug-linked-feature-empty {
    border-color: #64748b;
    background: rgb(15 23 42 / 0.55);
}

html.dark .bug-linked-feature-empty .bug-linked-feature-kicker,
html.dark .bug-linked-feature-missing {
    color: #cbd5e1;
}

li.feature-bug-status-new,
.bug-detail-card.feature-bug-status-new {
    border-color: #1e293b;
}

li.feature-bug-status-assigned,
.bug-detail-card.feature-bug-status-assigned {
    border-color: #2563eb;
}

li.feature-bug-status-open,
.bug-detail-card.feature-bug-status-open,
li.feature-bug-status-reopened,
.bug-detail-card.feature-bug-status-reopened {
    border-color: #4f46e5;
}

li.feature-bug-status-fixed,
.bug-detail-card.feature-bug-status-fixed {
    border-color: #0284c7;
}

li.feature-bug-status-retest,
.bug-detail-card.feature-bug-status-retest {
    border-color: #7c3aed;
}

li.feature-bug-status-closed,
.bug-detail-card.feature-bug-status-closed {
    border-color: #059669;
}

li.feature-bug-status-deferred,
.bug-detail-card.feature-bug-status-deferred {
    border-color: #d97706;
}

li.feature-bug-status-rejected,
.bug-detail-card.feature-bug-status-rejected {
    border-color: #e11d48;
}

html.dark .bug-detail-card {
    background: #0f172a;
}

html.dark li.feature-bug-status-new,
html.dark .bug-detail-card.feature-bug-status-new {
    border-color: #e2e8f0;
}

html.dark li.feature-bug-status-closed,
html.dark .bug-detail-card.feature-bug-status-closed {
    border-color: #34d399;
}

.feature-manage-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 0.85rem;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #cbd5e1;
    border-radius: 0.85rem;
    background: #fff;
    padding: 1.15rem 1.15rem 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.feature-manage-card h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: #0f172a;
}

.feature-manage-copy {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.feature-manage-card-block {
    border-top-color: #e11d48;
}

.feature-manage-card-label {
    border-top-color: #4f46e5;
}

.feature-manage-card-move {
    border-top-color: #0284c7;
}

.feature-manage-status {
    margin: 0;
    border-radius: 0.5rem;
    background: #fff1f2;
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #be123c;
}

.feature-manage-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.feature-manage-field-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.feature-manage-field {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
    color: #0f172a;
}

.feature-manage-field:focus {
    outline: 2px solid #c7d2fe;
    border-color: #6366f1;
}

.feature-manage-error {
    margin: 0;
    font-size: 0.75rem;
    color: #e11d48;
}

.feature-manage-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.feature-manage-btn {
    cursor: pointer;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.25rem;
}

.feature-manage-btn-primary {
    background: #0f172a;
    color: #fff;
}

.feature-manage-btn-primary:hover {
    background: #1e293b;
}

.feature-manage-btn-danger {
    background: #e11d48;
    color: #fff;
}

.feature-manage-btn-danger:hover {
    background: #be123c;
}

.feature-manage-btn-quiet {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.feature-manage-btn-quiet:hover {
    background: #f8fafc;
}

html.dark .feature-manage-card {
    border-color: #334155;
    background: #0f172a;
}

html.dark .feature-manage-card-block {
    border-top-color: #fb7185;
}

html.dark .feature-manage-card-label {
    border-top-color: #818cf8;
}

html.dark .feature-manage-card-move {
    border-top-color: #38bdf8;
}

html.dark .feature-manage-card h3 {
    color: #f8fafc;
}

html.dark .feature-manage-copy,
html.dark .feature-manage-field-group label {
    color: #cbd5e1;
}

html.dark .feature-manage-field {
    border-color: #475569;
    background: #020617;
    color: #f8fafc;
}

html.dark .feature-manage-status {
    background: rgb(136 19 55 / 0.35);
    color: #fecdd3;
}

html.dark .feature-manage-btn-quiet {
    border-color: #475569;
    background: transparent;
    color: #e2e8f0;
}

html.dark .feature-task-done-summary:hover {
    background: rgb(255 255 255 / 0.06);
}

.feature-task-card-target {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgb(79 70 229 / 0.28);
}

.feature-task-feedback {
    font-size: 1rem;
    line-height: 1.5;
}

.feature-task-comments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.feature-task-comments-heading {
    margin: 0 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.feature-task-comments-empty {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.feature-task-comment {
    margin-bottom: 0.5rem;
    padding-left: 0.6rem;
    border-left: 2px solid #c7d2fe;
}

.feature-task-comment-feedback {
    border-left-color: #d97706;
    background: #fffbeb;
    padding: 0.35rem 0.6rem;
}

.feature-task-comment-meta {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
}

.feature-task-comment-meta span {
    margin-left: 0.35rem;
    font-weight: 400;
    color: #64748b;
}

.feature-task-comment-body {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #334155;
}

.feature-task-comments .feature-task-btn {
    width: auto;
}

.feature-task-btn-comment {
    background: #334155;
}

.feature-task-btn-comment:hover {
    background: #1e293b;
}

html.dark .feature-task-comments {
    border-top-color: #334155;
}

.bug-comments-card .feature-task-comments {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

html.dark .feature-task-comment {
    border-left-color: #4338ca;
}

html.dark .feature-task-comment-feedback {
    border-left-color: #f59e0b;
    background: rgb(120 53 15 / 0.35);
}

html.dark .feature-task-comment-meta {
    color: #e2e8f0;
}

html.dark .feature-task-comment-body {
    color: #cbd5e1;
}

.feature-task-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.375rem;
}

.feature-task-field {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    background: #fff;
    color: #0f172a;
}

.feature-task-btn {
    width: 100%;
    cursor: pointer;
    border: 0;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: #fff;
    white-space: nowrap;
}

.feature-task-row .feature-task-btn {
    width: auto;
    max-width: 5.75rem;
    white-space: normal;
    text-align: center;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.feature-task-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.feature-task-btn-start,
.feature-task-btn-pass {
    background: #059669;
}

.feature-task-btn-start:hover,
.feature-task-btn-pass:hover {
    background: #047857;
}

.feature-task-btn-pause,
.feature-task-btn-sendback {
    background: #d97706;
}

.feature-task-btn-pause:hover,
.feature-task-btn-sendback:hover {
    background: #b45309;
}

.feature-task-btn-resume {
    background: #0d9488;
}

.feature-task-btn-resume:hover {
    background: #0f766e;
}

.feature-task-btn-submit {
    background: #4f46e5;
}

.feature-task-btn-submit:hover {
    background: #4338ca;
}

.feature-task-btn-withdraw {
    background: #475569;
}

.feature-task-btn-withdraw:hover {
    background: #334155;
}

.feature-task-btn-priority {
    background: #7c3aed;
}

.feature-task-btn-priority:hover {
    background: #6d28d9;
}

.feature-task-btn-due {
    background: #0284c7;
}

.feature-task-btn-due:hover {
    background: #0369a1;
}

.feature-task-btn-assign {
    background: #2563eb;
}

.feature-task-btn-assign:hover {
    background: #1d4ed8;
}

.feature-task-btn-convert {
    background: #ea580c;
}

.feature-task-btn-convert:hover {
    background: #c2410c;
}

.feature-task-btn-remove {
    background: #e11d48;
}

.feature-task-btn-remove:hover {
    background: #be123c;
}

html.dark .feature-task-field {
    background: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
}

.feature-page-top-button {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 40;
    cursor: pointer;
    border: 0;
    border-radius: 9999px;
    background: #0f172a;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.25);
}

.feature-page-top-button:hover {
    background: #1e293b;
}

html.dark .feature-page-top-button {
    background: #4f46e5;
}

html.dark .feature-page-top-button:hover {
    background: #6366f1;
}

.feature-task-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.feature-task-modal-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: rgb(15 23 42 / 0.55);
}

.feature-task-modal-backdrop-static {
    cursor: default;
}

.feature-task-modal-panel {
    position: relative;
    z-index: 1;
    width: min(46rem, calc(100vw - 2rem));
    max-height: min(90vh, 52rem);
    overflow: auto;
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.35);
}

html.dark .feature-task-modal-panel {
    background: #0f172a;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55);
}

@media (max-width: 639px) {
    .feature-task-card {
        grid-template-columns: minmax(0, 1fr);
    }
}

.hour-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    height: 13.5rem;
}

.hour-chart-col {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.hour-chart-track {
    display: flex;
    width: 100%;
    height: 11.25rem;
    align-items: flex-end;
}

.hour-chart-bar {
    width: 100%;
    border-radius: 0.25rem 0.25rem 0 0;
}

.hour-chart-bar-idle {
    background: #cbd5e1;
}

.hour-chart-bar-work {
    background: #6366f1;
}

.hour-chart-bar-busy {
    background: #059669;
}

.hour-chart-bar-quiet {
    background: #f59e0b;
}

.hour-chart-label {
    margin-top: 0.25rem;
    font-size: 10px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #64748b;
}

.hour-chart-label-hidden {
    color: transparent;
}

html.dark .hour-chart-bar-idle {
    background: #475569;
}

html.dark .hour-chart-label {
    color: #94a3b8;
}

.timeline-feature-card {
    display: block;
    border-radius: 0.75rem;
    border: 1px solid;
    border-left-width: 0.4rem;
    padding: 0.85rem 0.9rem;
}

.timeline-feature-kicker {
    margin: 0 0 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline-feature-bug-bar {
    height: 100%;
    background: #e11d48;
}

.timeline-feature-card-in_development {
    background: #f8fafc;
    border-color: #cbd5e1;
    border-left-color: #0f172a;
}

.timeline-feature-card-in_development .timeline-feature-kicker {
    color: #334155;
}

.timeline-feature-card-in_dev_testing {
    background: #f0f9ff;
    border-color: #7dd3fc;
    border-left-color: #0284c7;
}

.timeline-feature-card-in_dev_testing .timeline-feature-kicker {
    color: #0369a1;
}

.timeline-feature-card-in_client_review {
    background: #fffbeb;
    border-color: #fcd34d;
    border-left-color: #d97706;
}

.timeline-feature-card-in_client_review .timeline-feature-kicker {
    color: #b45309;
}

.timeline-feature-card-approved {
    background: #ecfdf5;
    border-color: #6ee7b7;
    border-left-color: #059669;
}

.timeline-feature-card-approved .timeline-feature-kicker {
    color: #047857;
}

.timeline-feature-card-live {
    background: #f5f3ff;
    border-color: #c4b5fd;
    border-left-color: #7c3aed;
}

.timeline-feature-card-live .timeline-feature-kicker {
    color: #6d28d9;
}

.timeline-feature-card:hover {
    filter: brightness(0.98);
}

html.dark .timeline-feature-card-in_development {
    background: #1e293b;
    border-color: #475569;
    border-left-color: #e2e8f0;
}

html.dark .timeline-feature-card-in_dev_testing {
    background: rgb(7 89 133 / 0.28);
    border-color: #0369a1;
    border-left-color: #38bdf8;
}

html.dark .timeline-feature-card-in_client_review {
    background: rgb(120 53 15 / 0.35);
    border-color: #b45309;
    border-left-color: #fbbf24;
}

html.dark .timeline-feature-card-approved {
    background: rgb(6 78 59 / 0.35);
    border-color: #047857;
    border-left-color: #34d399;
}

html.dark .timeline-feature-card-live {
    background: rgb(76 29 149 / 0.35);
    border-color: #6d28d9;
    border-left-color: #a78bfa;
}

.milestone-feature-card {
    display: block;
    border: 2px solid #64748b;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.75rem;
}

.milestone-feature-card-in_development {
    border-color: #334155;
    background: #f8fafc;
}

.milestone-feature-card-in_dev_testing {
    border-color: #0284c7;
    background: #f0f9ff;
}

.milestone-feature-card-in_client_review {
    border-color: #d97706;
    background: #fffbeb;
}

.milestone-feature-card-approved {
    border-color: #059669;
    background: #ecfdf5;
}

.milestone-feature-card-live {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.milestone-feature-card-blocked {
    border-color: #e11d48;
    background: #fff1f2;
}

.milestone-feature-card:hover {
    filter: brightness(0.98);
}

html.dark .milestone-feature-card-in_development {
    border-color: #e2e8f0;
    background: rgb(15 23 42 / 0.72);
}

html.dark .milestone-feature-card-in_dev_testing {
    border-color: #38bdf8;
    background: rgb(7 89 133 / 0.28);
}

html.dark .milestone-feature-card-in_client_review {
    border-color: #fbbf24;
    background: rgb(120 53 15 / 0.35);
}

html.dark .milestone-feature-card-approved {
    border-color: #34d399;
    background: rgb(6 78 59 / 0.35);
}

html.dark .milestone-feature-card-live {
    border-color: #a78bfa;
    background: rgb(76 29 149 / 0.35);
}

html.dark .milestone-feature-card-blocked {
    border-color: #fb7185;
    background: rgb(136 19 55 / 0.35);
}

.promotion-card {
    border-left: 4px solid #0ea5e9;
}

html.dark .promotion-card {
    border-left-color: #38bdf8;
}

.task-progress-bar {
    display: flex;
    height: 0.5rem;
    overflow: hidden;
    border-radius: 9999px;
    background: #f1f5f9;
}

.task-progress-done,
.task-progress-waiting,
.task-progress-started {
    height: 100%;
    flex: 0 0 auto;
}

.task-progress-done {
    background: #059669;
}

.task-progress-waiting {
    background: #7c3aed;
}

.task-progress-started {
    background: #4f46e5;
}

.task-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.4rem 0 0;
    font-size: 0.7rem;
    font-weight: 600;
}

.task-progress-legend-done {
    color: #047857;
}

.task-progress-legend-waiting {
    color: #6d28d9;
}

.task-progress-legend-started {
    color: #4338ca;
}

html.dark .task-progress-bar {
    background: #020617;
}

html.dark .task-progress-legend-done {
    color: #34d399;
}

html.dark .task-progress-legend-waiting {
    color: #c4b5fd;
}

html.dark .task-progress-legend-started {
    color: #a5b4fc;
}

/* Select2 — match form controls in light/dark */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    height: auto;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a;
    line-height: 1.25rem;
    padding-left: 0.5rem;
    padding-right: 1.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.35rem;
}

.select2-container--default .select2-selection--multiple {
    min-height: 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
}

.select2-dropdown {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    z-index: 80;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.35rem 0.5rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #4f46e5;
    color: #fff;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #6366f1;
    outline: 2px solid transparent;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

html.dark .select2-container--default .select2-selection--single,
html.dark .select2-container--default .select2-selection--multiple {
    border-color: #334155;
    background: #0f172a;
}

html.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e2e8f0;
}

html.dark .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

html.dark .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent;
}

html.dark .select2-dropdown {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

html.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: #334155;
    background: #020617;
    color: #e2e8f0;
}

html.dark .select2-container--default .select2-results__option {
    color: #e2e8f0;
}

html.dark .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #4f46e5;
    color: #fff;
}

html.dark .select2-container--default .select2-results__option--selected {
    background: #1e293b;
}
