    .task-dialog {
        /* Outer Radzen dialog (DialogOptions Width/Height) controls the
           footprint. The inner wrapper must fill it 100% — the old
           `max-width: min(1200px, 96vw)` was capping the content to
           1200 px even inside a 1600 px dialog, which left a white
           gutter on each side. Removed; the dialog now uses every pixel
           Radzen gives it. Radius is also dropped here so the rounded
           corners stay with the outer `.rz-dialog` chrome instead of
           being drawn twice. */
        display: flex;
        gap: 0;
        width: 100%;
        height: 100%;
        background: var(--rz-base-background-color);
        overflow: hidden;
    }

    /* Loading / empty variants keep the same footprint as the real dialog
       so nothing jumps when data arrives. Mirrors ServiceDesk's
       .ticket-dialog--loading pattern. */
    .task-dialog--loading {
        min-height: 500px;
        align-items: stretch;
        flex-direction: column;
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* MAIN CONTENT                                                                */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .task-main {
        flex: 1;
        padding: 1.625rem 1.5rem;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        border-right: 1px solid var(--rz-base-200);
        min-width: 0;
        background: var(--rz-base-background-color);
    }
    
    .task-breadcrumb {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        font-size: 0.75rem;
        color: var(--rz-text-tertiary-color);
    }
    
    .task-breadcrumb a {
        color: var(--rz-primary);
        text-decoration: none;
    }
    
    .task-breadcrumb a:hover {
        text-decoration: underline;
    }
    
    .task-header {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .task-type-badge {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .task-type-badge .rzi {
        font-size: 14px;
        color: white;
    }
    
    .task-header-content {
        flex: 1;
        min-width: 0;
    }
    
    .task-title-input {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--rz-text-color);
        border: none;
        background: transparent;
        width: 100%;
        padding: 0;
        margin: 0;
        outline: none;
        line-height: 1.4;
    }
    
    .task-title-input:focus {
        background: var(--rz-base-100);
        border-radius: 4px;
        padding: 0.25rem 0.5rem;
        margin: -0.25rem -0.5rem;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* DESCRIPTION                                                                 */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .section-header {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--rz-text-color);
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.375rem;
    }
    
    .section-header .rzi {
        font-size: 0.875rem;
        color: var(--rz-text-tertiary-color);
    }
    
    .description-content {
        background: var(--rz-base-100);
        border-radius: 6px;
        padding: 0.75rem;
        min-height: 80px;
        font-size: 0.8125rem;
        color: var(--rz-text-secondary-color);
        line-height: 1.6;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.15s ease;
    }
    
    .description-content:hover {
        background: var(--rz-base-50);
        border-color: var(--rz-base-300);
    }
    
    .description-placeholder {
        color: var(--rz-text-tertiary-color);
        font-style: italic;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* MARKDOWN CONTENT STYLING                                                    */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .markdown-content p {
        margin: 0 0 0.5em 0;
    }
    
    .markdown-content p:last-child {
        margin-bottom: 0;
    }
    
    .markdown-content ul, .markdown-content ol {
        margin: 0.5em 0;
        padding-left: 1.5em;
    }
    
    .markdown-content li {
        margin: 0.25em 0;
    }
    
    .markdown-content code {
        background: var(--rz-base-200);
        padding: 0.125em 0.375em;
        border-radius: 4px;
        font-size: 0.9em;
        font-family: 'Consolas', 'Monaco', monospace;
    }
    
    .markdown-content pre {
        background: var(--rz-base-200);
        padding: 0.75em;
        border-radius: 6px;
        overflow-x: auto;
        margin: 0.5em 0;
    }
    
    .markdown-content pre code {
        background: transparent;
        padding: 0;
    }
    
    .markdown-content blockquote {
        border-left: 3px solid var(--rz-primary);
        padding-left: 1em;
        margin: 0.5em 0;
        color: var(--rz-text-secondary-color);
    }
    
    .markdown-content h1, .markdown-content h2, .markdown-content h3, 
    .markdown-content h4, .markdown-content h5, .markdown-content h6 {
        margin: 0.75em 0 0.5em 0;
        font-weight: 600;
    }
    
    .markdown-content h1 { font-size: 1.25em; }
    .markdown-content h2 { font-size: 1.15em; }
    .markdown-content h3 { font-size: 1.05em; }
    
    .markdown-content a {
        color: var(--rz-primary);
        text-decoration: none;
    }
    
    .markdown-content a:hover {
        text-decoration: underline;
    }
    
    .markdown-content table {
        border-collapse: collapse;
        width: 100%;
        margin: 0.5em 0;
    }
    
    .markdown-content th, .markdown-content td {
        border: 1px solid var(--rz-base-300);
        padding: 0.5em;
        text-align: left;
    }
    
    .markdown-content th {
        background: var(--rz-base-100);
        font-weight: 600;
    }

    /* Inline images in markdown (description/comments) */
    .markdown-content img {
        max-width: 100%;
        border-radius: 6px;
        margin: 0.25rem 0;
        cursor: pointer;
    }

    .comments-list .markdown-content,
    .comments-list .markdown-content p,
    .comments-list .markdown-content ul,
    .comments-list .markdown-content ol,
    .comments-list .markdown-content li,
    .comments-list .markdown-content blockquote,
    .comments-list .markdown-content table,
    .comments-list .markdown-content th,
    .comments-list .markdown-content td {
        font-family: var(--rz-text-font-family);
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .comments-list .markdown-content img {
        max-width: min(240px, 100%);
        max-height: 180px;
        object-fit: cover;
        border: 1px solid var(--rz-base-200);
        box-shadow: var(--rz-shadow-xs);
    }

    .comment-attachment-strip {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 0.65rem 0 0;
        padding-left: 2.625rem;
    }

    .comment-attachment-chip {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        min-width: 180px;
        max-width: 260px;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--rz-base-300);
        border-radius: 12px;
        background: color-mix(in srgb, var(--rz-base-100) 85%, white);
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    }

    .comment-attachment-thumb {
        width: 52px;
        height: 52px;
        object-fit: cover;
        border-radius: 10px;
        flex: 0 0 auto;
        border: 1px solid color-mix(in srgb, var(--rz-base-400) 45%, transparent);
    }

    .comment-attachment-thumb-btn {
        padding: 0;
        background: transparent;
        border: none;
        cursor: zoom-in;
        border-radius: 10px;
        display: inline-flex;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .comment-attachment-thumb-btn:hover {
        transform: scale(1.04);
        box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    }

    .comment-attachment-chip--locked {
        opacity: 0.65;
        pointer-events: none;
    }
    .comment-attachment-chip--locked .comment-attachment-thumb-btn {
        pointer-events: auto;
    }

    .comment-input--sending {
        opacity: 0.75;
        cursor: progress;
    }

    .comment-attachment-meta {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .comment-attachment-name {
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--rz-text-color);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .comment-attachment-size {
        font-size: 0.75rem;
        color: var(--rz-text-tertiary-color);
    }

    .comment-attachment-remove {
        border: none;
        background: transparent;
        color: var(--rz-text-tertiary-color);
        cursor: pointer;
        padding: 0.15rem;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .comment-attachment-remove:hover {
        background: var(--rz-base-200);
        color: var(--rz-danger);
    }

    .desc-img-wrapper {
        position: relative;
        display: inline-block;
        margin: 0.25rem 0;
        max-width: 100%;
    }

    .desc-img-wrapper img {
        display: block;
        max-width: 100%;
    }

    .desc-img-delete {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(0,0,0,0.55);
        color: #fff;
        border: none;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        line-height: 1;
        padding: 0;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .desc-img-wrapper:hover .desc-img-delete {
        display: flex;
    }

    .desc-img-delete:hover {
        background: rgba(200,50,50,0.85);
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* ACTIVITY SECTION                                                            */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* SUBTASKS SECTION                                                            */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .subtasks-section {
        margin: 1rem 0;
    }

    .subtasks-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }
    
    .subtasks-header .section-header {
        margin-bottom: 0;
    }

    .subtask-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .subtask-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0.75rem;
        background: var(--rz-base-100);
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.15s;
    }

    .subtask-item:hover {
        background: var(--rz-base-200);
    }

    .subtask-status {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .subtask-status.done {
        background: var(--rz-success);
        color: white;
    }

    .subtask-status.in-progress {
        background: var(--rz-info);
        color: white;
    }

    .subtask-status.todo {
        background: var(--rz-base-300);
        color: var(--rz-text-color);
    }

    .subtask-code {
        color: var(--rz-text-secondary-color);
        font-size: 0.8rem;
        font-weight: 500;
        min-width: 60px;
    }

    .subtask-title {
        flex: 1;
        font-size: 0.9rem;
    }

    .subtask-title.completed {
        text-decoration: line-through;
        color: var(--rz-text-secondary-color);
    }

    .subtask-meta {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        color: var(--rz-text-secondary-color);
    }

    .subtask-assignee {
        font-size: 0.75rem;
    }

    .subtask-input-row {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .subtask-input-row input {
        flex: 1;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--rz-base-300);
        border-radius: 6px;
        background: var(--rz-base-background-color);
        color: var(--rz-text-color);
    }

    .subtask-input-row input:focus {
        outline: none;
        border-color: var(--rz-primary);
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* AI SUMMARY SECTION                                                          */
    /* ═══════════════════════════════════════════════════════════════════════════ */

    .ai-summary-section {
        background: linear-gradient(135deg, var(--rz-primary-lighter), var(--rz-info-lighter));
        border: 1px solid var(--rz-primary-light);
        border-radius: 8px;
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .ai-summary-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .ai-summary-icon {
        color: var(--rz-primary);
        font-size: 1.25rem;
    }
    
    .ai-summary-title {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--rz-primary);
    }
    
    .ai-summary-content {
        background: white;
        border-radius: 6px;
        padding: 0.75rem;
        font-size: 0.875rem;
        line-height: 1.6;
        color: var(--rz-text-secondary-color);
    }
    
    .ai-summary-placeholder {
        color: var(--rz-text-tertiary-color);
        font-style: italic;
        text-align: center;
        padding: 1rem;
    }
    
    .activity-section {
        border-top: 1px solid var(--rz-base-200);
        padding-top: 1rem;
        margin-top: auto;
    }
    
    .activity-tabs {
        display: flex;
        gap: 0.25rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--rz-base-200);
        padding-bottom: 0.5rem;
    }
    
    .activity-tab {
        padding: 0.375rem 0.75rem;
        border: none;
        background: transparent;
        font-size: 0.8125rem;
        color: var(--rz-text-secondary-color);
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.15s ease;
    }
    
    .activity-tab:hover {
        background: var(--rz-base-100);
    }
    
    .activity-tab.active {
        background: var(--rz-primary-lighter);
        color: var(--rz-primary);
        font-weight: 500;
    }
    
    .comment-input-wrapper {
        display: flex;
        gap: 0.625rem;
        align-items: flex-start;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        /* Background set inline via AvatarColors.For(name) so the same
           user renders with the same colour across every surface. */
        background: var(--rz-base-300);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 600;
        color: #ffffff;
        flex-shrink: 0;
    }
    
    .comment-input-area {
        flex: 1;
        min-width: 0;
    }

    .comment-input {
        width: 100%;
        box-sizing: border-box;
        padding: 0.625rem 0.75rem;
        border: 1px solid var(--rz-base-300);
        border-radius: 6px;
        font-family: var(--rz-text-font-family);
        font-size: 0.8125rem;
        line-height: 1.5;
        /* Clean white input; avoids gray-on-gray with the main panel. */
        background: var(--rz-base-background-color);
        color: var(--rz-text-color);
        resize: none;
        min-height: 36px;
        transition: all 0.15s ease;
    }

    .comment-char-counter {
        font-size: 0.6875rem;
        text-align: right;
        padding: 0.25rem 0.25rem 0;
        color: var(--rz-text-tertiary-color);
        transition: color 0.2s ease;
    }

    .comment-char-counter.warning {
        color: var(--rz-warning);
    }

    .comment-char-counter.danger {
        color: var(--rz-danger);
        font-weight: 500;
    }
    
    .comment-input:focus {
        outline: none;
        border-color: var(--rz-primary);
        box-shadow: 0 0 0 2px var(--rz-primary-lighter);
    }
    
    .comment-input::placeholder {
        color: var(--rz-text-tertiary-color);
    }
    
    /* Mention popup styles */
    .mention-popup {
        position: absolute;
        top: 100%;
        left: 2.625rem;
        right: 0;
        z-index: 1000;
        background: var(--rz-base-background-color);
        border: 1px solid var(--rz-base-300);
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        max-height: 200px;
        overflow-y: auto;
        margin-top: 4px;
    }
    
    .mention-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        cursor: pointer;
        transition: background-color 0.15s;
    }
    
    .mention-item:hover,
    .mention-item.selected {
        background: var(--rz-base-100);
    }
    
    .mention-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .mention-avatar-initials {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--rz-primary);
        color: white;
        font-size: 0.625rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mention-info {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .mention-name {
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--rz-text-color);
    }
    
    .mention-email {
        font-size: 0.6875rem;
        color: var(--rz-text-tertiary-color);
    }
    
    .mention-no-results {
        padding: 0.75rem;
        text-align: center;
        color: var(--rz-text-tertiary-color);
        font-size: 0.75rem;
    }
    
    .quick-actions {
        display: flex;
        gap: 0.25rem;
        margin-top: 0.5rem;
        padding-left: 2.625rem;
    }
    
    .quick-action {
        padding: 0.25rem 0.5rem;
        border: 1px solid var(--rz-base-300);
        border-radius: 4px;
        background: var(--rz-base-50);
        font-size: 0.6875rem;
        color: var(--rz-text-secondary-color);
        cursor: pointer;
        transition: all 0.15s ease;
    }
    
    .quick-action:hover {
        background: var(--rz-base-200);
        border-color: var(--rz-base-400);
    }
    
    /* No inner scroll: comments grow naturally and the parent .task-main
       handles vertical overflow. Caps the user perceived as "three scrolls"
       (dialog → main → activity-tab) collapse to a single scroll on .task-main. */
    .activity-tab-content {
        flex: 1;
        min-height: 0;
    }
    
    /* ── Time Tracking: Sidebar widget ── */
    .time-widget {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.125rem 0;
        width: 100%;
        min-height: 40px;
    }

    .time-widget-value {
        display: block;
        position: static;
        min-width: 0;
        display: flex;
        align-items: center;
        font-weight: 700;
        font-size: 0.9375rem;
        color: var(--rz-text-color);
        letter-spacing: -0.02em;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .time-widget-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.125rem;
        flex: 1;
        min-width: 0;
    }

    .time-widget-label {
        display: none;
    }

    .time-widget-detail {
        font-size: 0.6875rem;
        color: var(--rz-text-secondary-color);
        margin-top: 0;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .time-widget-actions {
        display: flex;
        gap: 0.375rem;
        align-items: center;
        flex-shrink: 0;
    }

    .time-widget-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 999px;
        border: 1px solid var(--rz-base-300);
        background: var(--rz-base-background-color);
        color: var(--rz-text-secondary-color);
        cursor: pointer;
        transition: all 0.15s ease;
        box-shadow: none;
        outline: none;
        appearance: none;
    }

    .time-widget-btn:hover {
        background: var(--rz-base-100);
        border-color: color-mix(in srgb, var(--rz-primary) 24%, var(--rz-base-300));
        color: var(--rz-primary);
        transform: translateY(-1px);
    }

    .time-widget-btn.primary {
        background: var(--rz-primary-lighter);
        border-color: color-mix(in srgb, var(--rz-primary) 22%, var(--rz-base-300));
        color: var(--rz-primary);
    }

    .time-widget-btn.primary:hover {
        background: var(--rz-primary);
        color: var(--rz-on-primary-lighter);
        opacity: 1;
        transform: translateY(-1px);
    }

    /* ── Time Tracking: Sidebar mini-entries ── */
    .time-sidebar-entries {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0 0;
        border-top: 1px solid var(--rz-base-200);
        animation: fadeIn 0.2s ease;
    }

    .detail-row-time {
        align-items: center;
    }

    .detail-value-time {
        padding: 0;
        min-height: 48px;
    }

    .detail-value-time-list {
        display: block;
        width: 100%;
        padding-top: 0.125rem;
    }

    .detail-time-entries-block {
        display: block;
        padding: 0 1rem 0.875rem calc(1rem + 116px + 0.875rem);
        min-height: 0;
    }

    .time-sidebar-entry {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.375rem 0.5rem;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.15s ease;
    }

    .time-sidebar-entry:hover {
        background: var(--rz-base-200);
    }

    .time-sidebar-entry-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--rz-primary-lighter);
        color: var(--rz-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.5625rem;
        font-weight: 600;
        flex-shrink: 0;
    }

    .time-sidebar-entry-body {
        flex: 1;
        min-width: 0;
        font-size: 0.6875rem;
        color: var(--rz-text-secondary-color);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-sidebar-entry-hours {
        font-weight: 700;
        font-size: 0.6875rem;
        color: var(--rz-primary);
        flex-shrink: 0;
    }

    /* ── Time Tracking: Activity tab ── */
    .time-tab-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 0.75rem;
    }

    .time-tab-stat {
        display: flex;
        align-items: baseline;
        gap: 0.375rem;
    }

    .time-tab-stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--rz-text-color);
        letter-spacing: -0.02em;
    }

    .time-tab-stat-unit {
        font-size: 0.75rem;
        color: var(--rz-text-tertiary-color);
        font-weight: 500;
    }

    .time-tab-entries {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .time-tab-entry {
        display: flex;
        align-items: flex-start;
        gap: 0.625rem;
        padding: 0.625rem 0.5rem;
        border-radius: 8px;
        transition: background 0.15s ease;
        cursor: pointer;
        position: relative;
    }

    .time-tab-entry:hover {
        background: var(--rz-base-100);
    }

    .time-tab-entry + .time-tab-entry {
        border-top: 1px solid var(--rz-base-200);
    }

    .time-tab-entry-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.625rem;
        font-weight: 600;
        flex-shrink: 0;
    }

    .time-tab-entry-content {
        flex: 1;
        min-width: 0;
    }

    .time-tab-entry-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .time-tab-entry-name {
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--rz-text-color);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-tab-entry-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.875rem;
        font-weight: 700;
        color: var(--rz-primary);
        background: var(--rz-primary-lighter);
        padding: 0.125rem 0.5rem;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .time-tab-entry-meta {
        font-size: 0.6875rem;
        color: var(--rz-text-tertiary-color);
        margin-top: 0.125rem;
        display: flex;
        align-items: center;
        gap: 0.375rem;
    }

    .time-tab-entry-meta .billable-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--rz-success);
        flex-shrink: 0;
    }

    .time-tab-entry-meta .billable-dot.non-billable {
        background: var(--rz-text-disabled-color);
    }

    .time-tab-entry-desc {
        font-size: 0.75rem;
        color: var(--rz-text-secondary-color);
        margin-top: 0.25rem;
        line-height: 1.4;
    }

    .time-tab-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 2rem 1rem;
        text-align: center;
    }

    .time-tab-empty-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--rz-base-200);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--rz-text-tertiary-color);
    }

    .time-tab-empty-text {
        font-size: 0.8125rem;
        color: var(--rz-text-tertiary-color);
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .history-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-item {
        display: flex;
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.8125rem;
        color: var(--rz-text-secondary-color);
        border-left: 2px solid var(--rz-base-300);
        padding-left: 0.75rem;
    }
    
    .history-item .history-time {
        font-size: 0.75rem;
        color: var(--rz-text-tertiary-color);
        white-space: nowrap;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* SIDEBAR                                                                     */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .task-sidebar {
        width: 392px;
        padding: 1rem 1rem 1.25rem;
        background: linear-gradient(180deg, var(--rz-base-50), var(--rz-base-background));
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        flex-shrink: 0;
        max-height: 80vh;
    }
    
    .status-dropdown {
        width: 100%;
    }
    
    .status-btn {
        width: 100%;
        padding: 0.625rem 0.9375rem;
        border-radius: 10px;
        font-weight: 500;
        font-size: 0.8125rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        border: none;
        transition: all 0.15s ease;
    }
    
    .status-btn.status-inprogress {
        background: var(--rz-primary);
        color: var(--rz-on-primary);
    }
    
    .status-btn.status-inprogress:hover {
        background: var(--rz-primary-dark);
    }
    
    .status-btn.status-todo {
        background: var(--rz-base-200);
        color: var(--rz-text-color);
    }
    
    .status-btn.status-done {
        background: var(--rz-success);
        color: var(--rz-on-primary);
    }
    
    .status-btn.status-btn-custom {
        background: var(--rz-base-200);
        color: var(--rz-text-color);
    }
    
    .status-btn.status-btn-custom:hover {
        filter: brightness(0.95);
    }
    
    .status-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--rz-base-background-color);
        border: 1px solid var(--rz-base-300);
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
        margin-top: 0.25rem;
        padding: 0.25rem;
    }
    
    .status-option {
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
        font-size: 0.8125rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: background-color 0.15s ease;
    }
    
    .status-option:hover {
        background-color: var(--rz-base-100);
    }
    
    .status-option.active {
        background-color: var(--rz-primary-lighter);
    }
    
    .status-indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* DETAIL ROWS                                                                 */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .details-section {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        background: var(--rz-base-background-color);
        border-radius: 14px;
        border: 1px solid var(--rz-base-200);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
        overflow: hidden;
    }
    
    .details-header {
        padding: 0.875rem 1rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--rz-text-tertiary-color);
        border-bottom: 1px solid var(--rz-base-200);
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }
    
    .details-header:hover {
        background: var(--rz-base-50);
    }
    
    .details-body {
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        padding: 0.25rem 0;
    }
    
    .detail-row {
        display: grid;
        grid-template-columns: minmax(104px, 116px) minmax(0, 1fr);
        align-items: start;
        padding: 0.8rem 1rem;
        gap: 0.875rem;
        transition: background 0.15s ease;
        min-height: 48px;
    }
    
    .detail-row:hover {
        background: var(--rz-base-50);
    }
    
    .detail-label {
        width: auto;
        font-size: 0.6875rem;
        color: var(--rz-text-tertiary-color);
        line-height: 1.35;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
    }
    
    .detail-value {
        font-size: 0.8125rem;
        color: var(--rz-text-color);
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        min-width: 0;
        width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.35;
        flex-wrap: wrap;
    }
    
    .detail-value.empty {
        color: var(--rz-text-tertiary-color);
    }

    .detail-person-name {
        font-size: 0.8125rem;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }
    
    .detail-value.clickable:hover {
        background: var(--rz-base-100);
        border-radius: 8px;
        margin: -0.1875rem -0.3125rem;
        padding: 0.1875rem 0.3125rem;
    }

    /* Sidebar dropdowns: no custom styling. Radzen theme handles metrics,
       typography and layout. Width is already forced to 100% via the
       surrounding `.detail-value` flex rules, which is enough. */

    .overdue-text {
        color: var(--rz-danger) !important;
        font-weight: 500;
    }
    
    .assignee-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.625rem;
        font-weight: 500;
        color: white;
        flex-shrink: 0;
    }
    
    .priority-badge {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .priority-badge .rzi {
        font-size: 16px;
    }
    
    .labels-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .label-chip {
        padding: 0.125rem 0.5rem;
        border-radius: 4px;
        font-size: 0.625rem;
        font-weight: 500;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* ASSIGNEE DROPDOWN & LOG TIME FORM                                           */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .assignee-dropdown .assignee-option:hover,
    .assignee-dropdown .assignee-option:focus {
        background: var(--rz-base-100) !important;
    }
    
    .assignee-dropdown .assignee-option.selected {
        background: var(--rz-primary-lighter);
        font-weight: 500;
    }
    
    /* Autocomplete / dropdown popup overrides removed — Radzen's own
       popup chrome (shadow, border, background, z-index) already works
       inside dialogs, and the pile of !important rules here was causing
       inconsistencies with the active theme. */
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* USER OPTION ITEM (for autocomplete dropdowns)                               */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .user-option-item {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.15rem;
    }
    
    .user-option-item .user-avatar {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.6rem;
        color: white;
        flex-shrink: 0;
        object-fit: cover;
    }
    
    .user-option-item .user-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    
    .user-option-item .user-name {
        font-weight: 500;
        color: var(--rz-text-color);
    }
    
    .user-option-item .user-email {
        font-size: 0.75rem;
        color: var(--rz-text-secondary-color);
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* FOOTER ACTIONS                                                              */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .sidebar-actions {
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid var(--rz-base-200);
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
    }
    
    .action-btn {
        width: 100%;
        padding: 0.5rem 0.75rem;
        border: none;
        border-radius: 4px;
        background: transparent;
        font-size: 0.8125rem;
        color: var(--rz-text-secondary-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.15s ease;
    }
    
    .action-btn:hover {
        background: var(--rz-base-100);
        color: var(--rz-text-color);
    }
    
    .action-btn.danger:hover {
        background: var(--rz-danger-lighter);
        color: var(--rz-danger);
    }
    
    .action-btn .rzi {
        font-size: 1rem;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* ATTACHMENT PREVIEW                                                          */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    .attachment-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        border-radius: 6px;
        background: var(--rz-base-100);
        transition: all 0.15s ease;
    }
    
    .attachment-item:hover {
        background: var(--rz-base-200);
    }
    
    .attachment-thumbnail {
        width: 40px;
        height: 40px;
        border-radius: 4px;
        object-fit: cover;
        cursor: pointer;
        transition: transform 0.15s ease;
        background: var(--rz-base-200);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .attachment-thumbnail:hover {
        transform: scale(1.05);
    }
    
    .attachment-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }
    
    .attachment-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .attachment-name {
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--rz-text-color);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .attachment-meta {
        font-size: 0.6875rem;
        color: var(--rz-text-tertiary-color);
    }
    
    .attachment-actions {
        display: flex;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .attachment-actions .action-btn {
        padding: 0.25rem;
        min-width: auto;
        opacity: 0.6;
    }
    
    .attachment-item:hover .attachment-actions .action-btn {
        opacity: 1;
    }
    
    /* Preview Modal Overlay */
    .preview-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.42);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        filter: none;
        z-index: 10100;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    
    .preview-modal-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
        color: white;
        z-index: 10101;
    }
    
    .preview-modal-title {
        font-size: 1rem;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        margin-right: 1rem;
    }
    
    .preview-modal-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .preview-modal-actions button {
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: white;
        padding: 0.5rem;
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.15s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .preview-modal-actions button:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .preview-modal-content {
        width: 90vw;
        height: 85vh;
        max-width: 90vw;
        max-height: 85vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }
    
    .preview-modal-content img {
        max-width: 100%;
        max-height: 85vh;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .preview-modal-content iframe {
        width: 90vw;
        height: 85vh;
        border: none;
        border-radius: 4px;
        background: white;
    }
    
    .preview-modal-content video {
        max-width: 90vw;
        max-height: 85vh;
        border-radius: 4px;
    }
    
    .preview-not-available {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 3rem;
        color: white;
        text-align: center;
    }
    
    .preview-not-available .rzi {
        font-size: 4rem;
        opacity: 0.5;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* RESPONSIVE                                                                  */
    /* ═══════════════════════════════════════════════════════════════════════════ */
    
    @media (max-width: 768px) {
        .task-dialog {
            flex-direction: column;
            max-height: none;
        }
        
        .task-main {
            border-right: none;
            border-bottom: 1px solid var(--rz-base-200);
        }
        
        .task-sidebar {
            width: 100%;
        }

        .detail-time-entries-block {
            padding-left: 1rem;
        }
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* STICKY TASK HEADER (breadcrumb + title)                                     */
    /* ═══════════════════════════════════════════════════════════════════════════ */

    .task-sticky-top {
        position: sticky;
        top: 0;
        background: var(--rz-base-background-color);
        z-index: 5;
        border-bottom: 1px solid var(--rz-base-200);
        padding-bottom: 0.5rem;
        margin: -1.625rem -1.5rem 0 -1.5rem;
        padding: 0.75rem 1.5rem 0.5rem 1.5rem;
    }

    /* ═══════════════════════════════════════════════════════════════════════════ */
    /* COMMENT REACTIONS (Jira-style pill toggles)                                 */
    /* ═══════════════════════════════════════════════════════════════════════════ */

    .tk-reactions {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 8px;
        align-items: center;
        position: relative;
    }

    .tk-reaction-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        background: var(--rz-base-50);
        border: 1px solid var(--rz-base-200);
        border-radius: 999px;
        font-size: 0.75rem;
        color: var(--rz-text-secondary-color);
        cursor: pointer;
        transition: background 120ms ease, border-color 120ms ease;
        line-height: 1.4;
    }

    .tk-reaction-chip:hover {
        background: var(--rz-base-100);
        border-color: var(--rz-base-300);
    }

    .tk-reaction-chip--active {
        background: var(--rz-primary-lighter, #e7f0ff);
        border-color: var(--rz-primary, #4a86e8);
        color: var(--rz-primary, #4a86e8);
    }

    .tk-reaction-chip--add {
        padding: 2px 6px;
    }

    .tk-reaction-chip__emoji {
        font-size: 0.9rem;
    }

    .tk-reaction-chip__count {
        font-variant-numeric: tabular-nums;
    }

    .tk-reaction-picker {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 4px;
        display: flex;
        gap: 2px;
        padding: 4px;
        background: var(--rz-base-background-color);
        border: 1px solid var(--rz-base-200);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        z-index: 10;
    }

    .tk-reaction-picker__item {
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        padding: 4px 6px;
        font-size: 1.1rem;
        cursor: pointer;
    }

    .tk-reaction-picker__item:hover {
        background: var(--rz-base-100);
    }
