/* Styles specific to the Tasks page */

/* Header and top actions */
.task-page-header {
    margin-bottom: 18px;
}

.task-actions-top {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Filter panel */
.task-filter-panel {
    padding: 14px !important;
}

/* Tabs for filtering by status */
.task-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 10px;
    overflow-x: auto;
}

.task-tabs button {
    min-width: 128px;
    padding: 12px 20px;
    color: #F8FAFC;
    background: rgba(17,24,39,.72);
    border: 1px solid rgba(148,163,184,.12);
    cursor: pointer;
    font-weight: 800;
    border-radius: 10px 10px 0 0;
}

.task-tabs button.active {
    color: #A78BFA;
    border-bottom: 2px solid #7C3AED;
    background: rgba(79,70,229,.16);
}

.task-tabs b {
    background: rgba(148,163,184,.16);
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    color: #E5E7EB;
}

/* Table and cards */
.task-table-card {
    overflow: hidden;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.task-table thead {
    background: rgba(30,41,59,.72);
    color: #CBD5E1;
}

.task-table th {
    text-align: left;
    padding: 14px 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(148,163,184,.12);
}

.task-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(148,163,184,.10);
    color: #E5E7EB;
    vertical-align: middle;
}

.task-table tr:hover {
    background: rgba(59,130,246,.055);
}

.task-table .select-col {
    width: 46px;
}

.task-table .right {
    text-align: right;
}

.task-title-cell {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 220px;
}

.task-title-cell b {
    display: block;
    color: #F8FAFC;
    margin-bottom: 4px;
}

.task-title-cell span {
    display: block;
    color: #9CA3AF;
    font-size: 12px;
}

.star-icon {
    color: #94A3B8;
}

/* Project dots */
.project-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 8px;
    background: #8B5CF6;
}

.project-dot.backend,
.project-dot.backend-api,
.project-dot.security,
.project-dot.infrastructure {
    background: #22C55E;
}

.project-dot.mobile-app {
    background: #3B82F6;
}

.project-dot.testing {
    background: #F59E0B;
}

/* Badge styles for status and priority */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(148,163,184,.22);
}

.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.badge.status.new {
    color: #38BDF8;
    background: rgba(14,165,233,.12);
    border-color: rgba(14,165,233,.35);
}

.badge.status.inprogress {
    color: #F59E0B;
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.4);
}

.badge.status.review {
    color: #8B5CF6;
    background: rgba(139,92,246,.13);
    border-color: rgba(139,92,246,.42);
}

.badge.status.blocked {
    color: #EF4444;
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.42);
}

.badge.status.done {
    color: #22C55E;
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.38);
}

.badge.priority.low {
    color: #22C55E;
    background: rgba(34,197,94,.10);
    border-color: rgba(34,197,94,.35);
}

.badge.priority.medium {
    color: #F59E0B;
    background: rgba(245,158,11,.10);
    border-color: rgba(245,158,11,.35);
}

.badge.priority.high,
.badge.priority.critical {
    color: #EF4444;
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.35);
}

/* Assignee and avatar */
.assignee {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg,#38BDF8,#7C3AED);
    box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}

/* Tag chip */
.tag-chip {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 7px;
    font-size: 12px;
    color: #93C5FD;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.32);
}

/* Due text colors */
.due-overdue {
    color: #EF4444;
    font-weight: 700;
}

.due-done {
    color: #22C55E;
    font-weight: 700;
}

/* Table footer and pager */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    color: #94A3B8;
}

.pager {
    display: flex;
    gap: 8px;
}

.pager button {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.12);
    color: #E5E7EB;
    background: rgba(15,23,42,.8);
    cursor: pointer;
}

.pager button.active {
    background: #4F46E5;
    border-color: #6366F1;
    color: white;
}

/* Drawer and task form styling */
.new-task-drawer .mud-drawer {
    background: rgba(15,23,42,.98) !important;
    border-left: 1px solid rgba(148,163,184,.16);
}

.drawer-content {
    height: 100%;
    padding: 28px;
    overflow-y: auto;
    color: #F8FAFC;
    background: radial-gradient(circle at 40% 0%, rgba(59,130,246,.14), transparent 35%), #0F172A;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.drawer-header h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -.03em;
}

.drawer-content h3 {
    font-size: 16px;
    margin: 22px 0 14px;
}

.drawer-label {
    display: block;
    margin: 14px 0 8px;
    color: #E5E7EB;
    font-size: 13px;
    font-weight: 800;
}

.fake-editor-toolbar {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148,163,184,.20);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: rgba(17,24,39,.68);
    color: #CBD5E1;
}

.fake-editor-toolbar span {
    margin-right: auto;
}

.editor-textarea textarea {
    min-height: 94px !important;
}

.upload-zone {
    border: 1px dashed rgba(148,163,184,.32);
    border-radius: 14px;
    padding: 28px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #CBD5E1;
    background: rgba(30,41,59,.35);
}

.upload-zone small {
    color: #94A3B8;
}

.drawer-footer {
    position: sticky;
    bottom: -28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px 0 0;
    margin-top: 26px;
    background: linear-gradient(180deg,transparent,#0F172A 38%);
}

/* Polished right drawer form matching the SaaS mockup */
.new-task-drawer .mud-drawer {
    width: 430px !important;
    max-width: calc(100vw - 18px);
    margin: 8px 8px 8px 0;
    height: calc(100vh - 16px) !important;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(10, 20, 34, .98)) !important;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: -24px 0 80px rgba(0, 0, 0, .42);
}

/* Backdrop and panel for the task drawer used by TaskFormDrawer.razor */
.task-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1000;
}

.task-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 430px;
    max-width: calc(100vw - 18px);
    margin: 8px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(10, 20, 34, .98));
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: -24px 0 80px rgba(0, 0, 0, .42);
    height: calc(100vh - 16px);
    z-index: 1100;
}

.task-form-drawer {
    padding: 28px 26px 14px;
    background:
        radial-gradient(circle at 30% 0%, rgba(59, 130, 246, .14), transparent 32%),
        radial-gradient(circle at 100% 35%, rgba(124, 58, 237, .10), transparent 28%),
        #0F172A;
}

.drawer-header.compact {
    margin-bottom: 24px;
}

.drawer-header.compact h2 {
    font-size: 20px;
    font-weight: 900;
}

.task-form-drawer h3 {
    margin: 18px 0 14px;
    color: #F8FAFC;
    font-size: 14px;
    font-weight: 900;
}

.drawer-label {
    margin: 12px 0 7px;
    font-size: 12px;
    line-height: 1;
    color: #E5E7EB;
    font-weight: 800;
}

.drawer-label.required::after {
    content: ' *';
    color: #FF5757;
}

.task-form-drawer .mud-input-control {
    margin-top: 0;
}

.task-form-drawer .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, .20) !important;
}

.task-form-drawer .mud-input-root {
    color: #E5E7EB !important;
    font-size: 13px;
}

.task-form-drawer .mud-input input,
.task-form-drawer .mud-input textarea {
    color: #E5E7EB !important;
}

.task-form-drawer .mud-input input::placeholder,
.task-form-drawer .mud-input textarea::placeholder {
    color: #64748B !important;
    opacity: 1;
}

.rich-editor {
    border-radius: 7px;
    overflow: hidden;
}

.rich-editor .mud-input-outlined-border {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.fake-editor-toolbar {
    gap: 12px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: rgba(15, 23, 42, .58);
    color: #CBD5E1;
}

.fake-editor-toolbar span {
    margin-right: 2px;
    font-size: 12px;
    color: #F1F5F9;
}

.editor-textarea textarea {
    min-height: 94px !important;
}
/* Demo business fields from IRAP meeting notes */
.impact-cell {
    max-width: 300px;
}

.impact-cell b {
    display: block;
    color: #93C5FD;
    font-size: 12px;
    margin-bottom: 3px;
}

.impact-cell span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #CBD5E1;
    font-size: 12px;
    line-height: 1.35;
}

.progress-cell {
    min-width: 96px;
}

.progress-track.small {
    width: 96px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148,163,184,.18);
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: #3B82F6;
}

.progress-fill.inprogress { background: #F59E0B; }
.progress-fill.review { background: #8B5CF6; }
.progress-fill.blocked { background: #EF4444; }
.progress-fill.done { background: #22C55E; }
.progress-fill.new { background: #38BDF8; }

.progress-cell small {
    color: #CBD5E1;
    font-size: 12px;
    font-weight: 800;
}

.task-table th:nth-child(8),
.task-table td:nth-child(8) {
    min-width: 270px;
}

/* Compact task form and Task Details dialog */
.drawer-helper-text {
    color: #94A3B8;
    margin: -12px 0 16px;
    font-size: 13px;
    line-height: 1.45;
}

.task-title-button {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #F8FAFC;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.task-title-button:hover {
    color: #93C5FD;
    text-decoration: underline;
}

.avatar.secondary {
    background: linear-gradient(135deg,#A78BFA,#64748B);
}

.activity-cell {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #CBD5E1;
    white-space: nowrap;
}

.activity-cell span {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(148,163,184,.10);
    border: 1px solid rgba(148,163,184,.14);
    font-size: 12px;
}

.task-details-dialog .mud-dialog-content {
    padding-top: 0 !important;
}

.task-details-titlebar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

.task-details-titlebar h2 {
    margin: 0;
    color: #F8FAFC;
    font-size: 24px;
    letter-spacing: -.03em;
}

.task-details-titlebar p {
    margin: 4px 0 0;
    color: #94A3B8;
}

.task-details-meta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.task-details-meta-grid > div,
.task-progress-panel,
.task-overview-card {
    padding: 12px;
    border-radius: 14px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
}

.task-details-meta-grid span {
    display: block;
    color: #94A3B8;
    font-size: 12px;
    margin-bottom: 4px;
}

.task-details-meta-grid b {
    color: #F8FAFC;
}

.task-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #F8FAFC;
    margin-bottom: 4px;
}

.task-details-tabs-panel {
    padding-top: 16px;
}

.task-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 18px;
}

.task-description {
    color: #CBD5E1;
    line-height: 1.55;
    white-space: pre-wrap;
}

.task-chat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 4px;
}

.task-chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.task-chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg,#38BDF8,#7C3AED);
    flex: 0 0 auto;
}

.task-chat-bubble {
    flex: 1;
    padding: 11px 13px;
    border-radius: 14px;
    background: rgba(15,23,42,.72);
    border: 1px solid rgba(148,163,184,.14);
}

.task-chat-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}

.task-chat-top b { color: #F8FAFC; }
.task-chat-top span { color: #94A3B8; font-size: 12px; }
.task-chat-bubble p { margin: 0; color: #CBD5E1; white-space: pre-wrap; }

.task-chat-input {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148,163,184,.14);
}

.task-chat-actions,
.subtask-add-panel {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.author-select { max-width: 190px; }
.subtask-owner-select { max-width: 180px; }

.subtask-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
}

.subtask-item input {
    width: 18px;
    height: 18px;
}

.subtask-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subtask-main b { color: #F8FAFC; }
.subtask-main span { color: #94A3B8; font-size: 12px; }
.done-subtask { text-decoration: line-through; color: #94A3B8 !important; }

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.attachment-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
    color: #E5E7EB;
}

.attachment-card b { display: block; color: #F8FAFC; }
.attachment-card small { color: #94A3B8; }

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 12px 14px;
    border-left: 3px solid #6366F1;
    border-radius: 10px;
    background: rgba(15,23,42,.62);
    color: #CBD5E1;
}

.history-item b { display: block; color: #F8FAFC; }
.history-item span { display: block; color: #94A3B8; font-size: 12px; margin-top: 2px; }
.history-item p { margin: 6px 0 0; }

.empty-state {
    padding: 18px;
    border-radius: 14px;
    color: #94A3B8;
    background: rgba(15,23,42,.50);
    border: 1px dashed rgba(148,163,184,.24);
    text-align: center;
}

@media (max-width: 900px) {
    .task-details-meta-grid,
    .task-overview-grid {
        grid-template-columns: 1fr;
    }

    .task-chat-actions,
    .subtask-add-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .author-select,
    .subtask-owner-select {
        max-width: none;
    }
}

/* Clickable upload area for manual screenshots/images */
.clickable-upload {
    cursor: pointer;
    position: relative;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.clickable-upload:hover {
    border-color: rgba(59,130,246,.75);
    background: rgba(30,64,175,.18);
    transform: translateY(-1px);
}

.hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-preview-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.upload-preview-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
}

.upload-preview-item img {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.18);
}

.upload-preview-item b {
    display: block;
    color: #F8FAFC;
}

.upload-preview-item small {
    color: #94A3B8;
}

.attachment-card-image img {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.18);
}

/* Lookup management pages */
.lookup-add-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.lookup-add-row.three {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}
.lookup-table td {
    vertical-align: middle;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
}
.settings-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}
.settings-card h3 { margin: 4px 0 0; }
.settings-card p { color: #94A3B8; flex: 1; }

/* Dedicated chat page */
.task-short-card {
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(15,23,42,.65);
    padding: 14px;
    display: grid;
    gap: 8px;
}
.task-short-card span, .task-short-card small { color: #94A3B8; }
.task-short-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.task-chat-page-panel { min-height: 640px; display: flex; flex-direction: column; }
.page-chat-list { flex: 1; min-height: 420px; max-height: 520px; overflow: auto; }
.page-chat-input { margin-top: 14px; }

/* SubTasks tree page */
.subtask-tree {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 16px;
}
.subtask-tree-task { min-height: 160px; }
.subtask-tree-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148,163,184,.14);
}
.subtask-tree-header div { display: grid; gap: 4px; }
.subtask-tree-header span { color: #94A3B8; }
.subtask-tree-children { margin-top: 12px; display: grid; gap: 10px; }
.subtask-tree-child {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15,23,42,.55);
    border: 1px solid rgba(148,163,184,.12);
}
.subtask-tree-child div { display: grid; gap: 4px; }
.subtask-tree-child span { color: #94A3B8; font-size: 12px; }
.empty-state.compact { padding: 12px; font-size: 13px; }

/* Task Details overview dashboard */
.overview-dashboard-grid {
    grid-template-columns: 1.2fr .8fr;
}
.overview-summary-card {
    grid-row: span 3;
}
.overview-mini-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.overview-mini-grid div {
    border-radius: 12px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
    padding: 10px;
    display: grid;
    gap: 3px;
}
.overview-mini-grid span { color: #94A3B8; font-size: 12px; }
.overview-widget-card {
    border-radius: 16px;
    background: rgba(15,23,42,.62);
    border: 1px solid rgba(148,163,184,.14);
    padding: 14px;
    min-height: 120px;
}
.overview-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.overview-widget-title span {
    margin-left: auto;
    border-radius: 999px;
    padding: 2px 8px;
    color: #93C5FD;
    background: rgba(59,130,246,.14);
    font-weight: 800;
    font-size: 12px;
}
.overview-chat-row, .overview-subtask-row {
    display: grid;
    gap: 3px;
    padding: 8px 0;
    border-top: 1px solid rgba(148,163,184,.1);
}
.overview-chat-row span { color: #CBD5E1; font-size: 13px; }
.overview-subtask-row {
    grid-template-columns: 22px 1fr;
    align-items: center;
}
.overview-attachment-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.overview-attachment-strip img {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.18);
}

@media (max-width: 1100px) {
    .settings-grid, .subtask-tree { grid-template-columns: 1fr; }
    .overview-dashboard-grid { grid-template-columns: 1fr; }
    .lookup-add-row, .lookup-add-row.three { grid-template-columns: 1fr; }
}

/* Task overview and separate work dialogs */
.task-overview-dialog .mud-dialog-content,
.task-work-dialog .mud-dialog-content {
    background: #0B1220;
}

.task-dialog-title h2,
.task-details-titlebar h2 {
    margin: 0;
    color: #F8FAFC;
}

.task-dialog-title p,
.task-details-titlebar p {
    margin: 4px 0 0;
    color: #93A4BE;
}

.overview-stage-card {
    border: 1px solid rgba(148, 163, 184, .18);
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(15, 23, 42, .85));
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
}

.overview-stage-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.eyebrow {
    color: #93C5FD;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.overview-stage-card h3 {
    color: #F8FAFC;
    margin: 6px 0;
    font-size: 26px;
}

.overview-stage-card p {
    color: #CBD5E1;
    margin: 0;
}

.overview-progress-number {
    min-width: 92px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(59, 130, 246, .16);
    border: 1px solid rgba(59, 130, 246, .28);
    color: #BFDBFE;
    font-size: 26px;
    font-weight: 900;
}

.overview-progress-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.overview-click-card {
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.overview-click-card:hover {
    border-color: rgba(59, 130, 246, .42);
    background: rgba(59, 130, 246, .08);
}

.task-work-dialog .mud-dialog-content {
    min-height: 520px;
}

.task-chat-window {
    min-height: 420px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 8px 0 18px;
}

.sticky-chat-input {
    position: sticky;
    bottom: 0;
    padding-top: 14px;
    background: #0B1220;
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.subtask-tree {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: rgba(15, 23, 42, .55);
    padding: 16px;
}

.subtask-root {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .22);
}

.subtask-root b,
.subtask-tree-item b {
    display: block;
    color: #F8FAFC;
}

.subtask-root span,
.subtask-tree-item span {
    color: #93A4BE;
    font-size: 12px;
}

.subtask-branches {
    margin-left: 22px;
    padding-left: 18px;
    border-left: 1px dashed rgba(148, 163, 184, .28);
    margin-top: 12px;
}

.subtask-tree-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 8px 0;
    border-radius: 14px;
    background: rgba(17, 24, 39, .72);
    border: 1px solid rgba(148, 163, 184, .12);
}

.subtask-add-panel {
    display: grid;
    grid-template-columns: 1fr 190px auto;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.task-upload-box {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 16px;
    background: rgba(15, 23, 42, .55);
    color: #CBD5E1;
    cursor: pointer;
    margin-bottom: 16px;
    text-align: center;
}

.task-upload-box:hover {
    border-color: rgba(59, 130, 246, .65);
    background: rgba(59, 130, 246, .08);
}

.native-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.attachment-grid.large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.attachment-card.image-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .14);
}

.attachment-card.image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.attachment-card.image-card div {
    padding: 10px;
}

.history-list.large {
    display: grid;
    gap: 12px;
}

.history-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .14);
}

.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3B82F6;
    margin-top: 6px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .16);
}

@media (max-width: 760px) {
    .overview-progress-actions,
    .subtask-add-panel {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------
   Light mode fixes for Tasks page
------------------------------ */

.light-mode .task-tabs button {
    color: #475569;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
}

    .light-mode .task-tabs button.active {
        color: #2563EB;
        background: #DBEAFE;
        border-bottom: 2px solid #2563EB;
    }

.light-mode .task-tabs b {
    background: #E2E8F0;
    color: #334155;
}

/* Task table */
.light-mode .task-table-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.light-mode .task-table thead {
    background: #F1F5F9;
    color: #475569;
}

.light-mode .task-table th {
    color: #475569;
    border-bottom: 1px solid #E5E7EB;
}

.light-mode .task-table td {
    color: #111827;
    border-bottom: 1px solid #E5E7EB;
}

.light-mode .task-table tr:hover {
    background: #F8FAFC;
}

.light-mode .task-title-cell b,
.light-mode .task-title-button {
    color: #111827;
}

    .light-mode .task-title-button:hover {
        color: #2563EB;
    }

.light-mode .task-title-cell span {
    color: #64748B;
}

.light-mode .star-icon {
    color: #64748B;
}

/* Activity / progress */
.light-mode .activity-cell {
    color: #334155;
}

    .light-mode .activity-cell span {
        background: #F1F5F9;
        border: 1px solid #E2E8F0;
        color: #334155;
    }

.light-mode .progress-track.small {
    background: #E2E8F0;
}

.light-mode .progress-cell small {
    color: #334155;
}

/* Footer / pager */
.light-mode .table-footer {
    color: #64748B;
    background: #FFFFFF;
}

.light-mode .pager button {
    color: #334155;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
}

    .light-mode .pager button.active {
        color: #FFFFFF;
        background: #2563EB;
        border-color: #2563EB;
    }

/* Drawer */
.light-mode .task-drawer-backdrop {
    background: rgba(15, 23, 42, .35);
}

.light-mode .task-drawer-panel {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: -24px 0 80px rgba(15, 23, 42, .18);
}

.light-mode .task-form-drawer {
    background: #FFFFFF;
    color: #111827;
}

    .light-mode .drawer-header h2,
    .light-mode .drawer-header.compact h2,
    .light-mode .task-form-drawer h3,
    .light-mode .drawer-label {
        color: #111827;
    }

.light-mode .drawer-helper-text {
    color: #64748B;
}

.light-mode .task-form-drawer .mud-input-root {
    color: #111827 !important;
}

.light-mode .task-form-drawer .mud-input input,
.light-mode .task-form-drawer .mud-input textarea {
    color: #111827 !important;
}

    .light-mode .task-form-drawer .mud-input input::placeholder,
    .light-mode .task-form-drawer .mud-input textarea::placeholder {
        color: #94A3B8 !important;
    }

.light-mode .task-form-drawer .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
}

.light-mode .fake-editor-toolbar {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-bottom: 0;
    color: #475569;
}

    .light-mode .fake-editor-toolbar span {
        color: #111827;
    }

.light-mode .upload-zone,
.light-mode .clickable-upload {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #475569;
}

    .light-mode .upload-zone small {
        color: #64748B;
    }

.light-mode .drawer-footer {
    background: linear-gradient(180deg, transparent, #FFFFFF 38%);
}

/* Task details / work dialogs */
.light-mode .task-overview-dialog .mud-dialog-content,
.light-mode .task-work-dialog .mud-dialog-content,
.light-mode .sticky-chat-input {
    background: #FFFFFF;
}

.light-mode .task-dialog-title h2,
.light-mode .task-details-titlebar h2 {
    color: #111827;
}

.light-mode .task-dialog-title p,
.light-mode .task-details-titlebar p {
    color: #64748B;
}

.light-mode .task-details-meta-grid > div,
.light-mode .task-progress-panel,
.light-mode .task-overview-card,
.light-mode .overview-widget-card,
.light-mode .overview-mini-grid div {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

.light-mode .task-details-meta-grid span,
.light-mode .overview-mini-grid span {
    color: #64748B;
}

.light-mode .task-details-meta-grid b,
.light-mode .task-progress-header,
.light-mode .overview-stage-card h3 {
    color: #111827;
}

.light-mode .task-description {
    color: #334155;
}

/* Overview */
.light-mode .overview-stage-card {
    background: linear-gradient(135deg, #EFF6FF, #FFFFFF);
    border: 1px solid #BFDBFE;
}

    .light-mode .overview-stage-card p {
        color: #475569;
    }

.light-mode .overview-progress-number {
    background: #DBEAFE;
    border: 1px solid #93C5FD;
    color: #1D4ED8;
}

.light-mode .overview-click-card:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.light-mode .overview-widget-title span {
    background: #DBEAFE;
    color: #2563EB;
}

.light-mode .overview-chat-row span {
    color: #334155;
}

/* Chat */
.light-mode .task-chat-bubble {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

.light-mode .task-chat-top b {
    color: #111827;
}

.light-mode .task-chat-top span,
.light-mode .task-chat-bubble p {
    color: #475569;
}

.light-mode .task-chat-input,
.light-mode .sticky-chat-input {
    border-top: 1px solid #E5E7EB;
}

/* Subtasks */
.light-mode .subtask-tree {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
}

.light-mode .subtask-root {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
}

    .light-mode .subtask-root b,
    .light-mode .subtask-tree-item b,
    .light-mode .subtask-main b {
        color: #111827;
    }

    .light-mode .subtask-root span,
    .light-mode .subtask-tree-item span,
    .light-mode .subtask-main span {
        color: #64748B;
    }

.light-mode .subtask-branches {
    border-left: 1px dashed #CBD5E1;
}

.light-mode .subtask-tree-item,
.light-mode .subtask-item,
.light-mode .subtask-tree-child {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

.light-mode .done-subtask {
    color: #94A3B8 !important;
}

/* Attachments */
.light-mode .attachment-card,
.light-mode .upload-preview-item,
.light-mode .attachment-card.image-card {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    color: #334155;
}

    .light-mode .attachment-card b,
    .light-mode .upload-preview-item b {
        color: #111827;
    }

    .light-mode .attachment-card small,
    .light-mode .upload-preview-item small {
        color: #64748B;
    }

.light-mode .task-upload-box {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #475569;
}

    .light-mode .task-upload-box:hover {
        background: #EFF6FF;
        border-color: #60A5FA;
    }

/* History */
.light-mode .history-item {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    color: #334155;
}

    .light-mode .history-item b {
        color: #111827;
    }

    .light-mode .history-item span {
        color: #64748B;
    }

/* Empty states */
.light-mode .empty-state,
.light-mode .empty-state.compact {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    color: #64748B;
}

/* Lookup/settings pages */
.light-mode .settings-card,
.light-mode .task-short-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #111827;
}

    .light-mode .settings-card p,
    .light-mode .task-short-card span,
    .light-mode .task-short-card small {
        color: #64748B;
    }

/* -----------------------------
   Light mode fixes for Task Chat Dialog
------------------------------ */

.light-mode .task-chat-dialog .mud-dialog-content {
    background: #FFFFFF !important;
    color: #111827 !important;
}

.light-mode .task-chat-dialog .task-chat-window {
    background: #FFFFFF !important;
    color: #111827 !important;
}

.light-mode .task-chat-dialog .sticky-chat-input {
    background: #FFFFFF !important;
    border-top: 1px solid #E5E7EB !important;
}

.light-mode .task-chat-dialog .empty-state {
    background: #F8FAFC !important;
    border: 1px dashed #CBD5E1 !important;
    color: #64748B !important;
}

.light-mode .task-chat-dialog .task-chat-bubble {
    background: #F8FAFC !important;
    border: 1px solid #E5E7EB !important;
}

.light-mode .task-chat-dialog .task-chat-top b {
    color: #111827 !important;
}

.light-mode .task-chat-dialog .task-chat-top span,
.light-mode .task-chat-dialog .task-chat-bubble p {
    color: #475569 !important;
}

/* Textarea/input inside chat */
.light-mode .task-chat-dialog .mud-input-root,
.light-mode .task-chat-dialog .mud-input,
.light-mode .task-chat-dialog textarea,
.light-mode .task-chat-dialog input {
    color: #111827 !important;
}

.light-mode .task-chat-dialog .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
}

.light-mode .task-chat-dialog textarea::placeholder,
.light-mode .task-chat-dialog input::placeholder {
    color: #94A3B8 !important;
    opacity: 1;
}

/* Author dropdown / chip area */
.light-mode .task-chat-dialog .task-chat-actions {
    background: #FFFFFF !important;
}

.light-mode .task-chat-dialog .author-select {
    background: #FFFFFF !important;
    color: #111827 !important;
}
.task-filter-row {
    display: grid;
    grid-template-columns: 280px 240px 240px 240px 240px 90px;
    gap: 10px;
    align-items: center;
    max-width: 1380px;
}

.task-filter-panel {
    padding: 18px !important;
}

.task-search-control,
.task-filter-control {
    width: 100%;
}

.task-clear-button {
    height: 40px;
    min-width: 90px;
    justify-content: center;
    color: #F8FAFC !important;
    font-weight: 800;
}
.menu-group-title {
    padding: 8px 16px 4px;
    color: #64748B !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.danger-menu-item {
    color: #FCA5A5 !important;
}

    .danger-menu-item .mud-icon-root {
        color: #F87171 !important;
    }

.light-mode .menu-group-title {
    color: #64748B !important;
}

.light-mode .danger-menu-item {
    color: #B91C1C !important;
}

    .light-mode .danger-menu-item .mud-icon-root {
        color: #DC2626 !important;
    }

/* Better spacing for Task Chat dialog */
.task-chat-dialog .mud-dialog-content {
    padding: 24px !important;
}

.task-chat-window {
    padding: 8px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-chat-message {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.task-chat-avatar {
    margin-top: 4px;
}

.task-chat-bubble {
    padding: 14px 16px;
    border-radius: 14px;
}

.task-chat-top {
    margin-bottom: 8px;
}

.sticky-chat-input {
    margin-top: 18px;
    padding: 18px 0 0;
}
.chat-author-chip {
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .62);
    border: 1px solid rgba(148, 163, 184, .14);
}

    .chat-author-chip span {
        display: block;
        color: #94A3B8;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .chat-author-chip b {
        display: block;
        color: #F8FAFC;
        font-size: 13px;
    }

.light-mode .chat-author-chip {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

    .light-mode .chat-author-chip span {
        color: #64748B;
    }

    .light-mode .chat-author-chip b {
        color: #111827;
    }
/* -----------------------------
   Final dark/light polish for Chat and SubTasks dialogs
------------------------------ */
.task-chat-dialog .mud-dialog-title,
.task-subtasks-dialog .mud-dialog-title,
.task-chat-dialog .mud-dialog-content,
.task-subtasks-dialog .mud-dialog-content,
.task-chat-dialog .mud-dialog-actions,
.task-subtasks-dialog .mud-dialog-actions {
    background: #0B1220 !important;
    color: #F8FAFC !important;
}

.task-chat-dialog .mud-dialog-content,
.task-subtasks-dialog .mud-dialog-content {
    padding: 24px !important;
}

.task-chat-dialog .mud-dialog-actions,
.task-subtasks-dialog .mud-dialog-actions {
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.task-chat-dialog .mud-input-root,
.task-chat-dialog .mud-input,
.task-chat-dialog textarea,
.task-subtasks-dialog .mud-input-root,
.task-subtasks-dialog .mud-input,
.task-subtasks-dialog input {
    color: #F8FAFC !important;
    -webkit-text-fill-color: #F8FAFC !important;
}

.task-chat-dialog .mud-input-outlined-border,
.task-subtasks-dialog .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, .35) !important;
}

.task-chat-dialog textarea::placeholder,
.task-subtasks-dialog input::placeholder {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    opacity: 1 !important;
}

.task-subtasks-dialog .subtask-tree {
    background: rgba(15, 23, 42, .55) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
}

.task-subtasks-dialog .subtask-root {
    background: rgba(59, 130, 246, .12) !important;
    border: 1px solid rgba(59, 130, 246, .22) !important;
}

.task-subtasks-dialog .subtask-tree-item {
    background: rgba(17, 24, 39, .72) !important;
    border: 1px solid rgba(148, 163, 184, .12) !important;
}

.task-subtasks-dialog .subtask-root b,
.task-subtasks-dialog .subtask-tree-item b {
    color: #F8FAFC !important;
}

.task-subtasks-dialog .subtask-root span,
.task-subtasks-dialog .subtask-tree-item span {
    color: #94A3B8 !important;
}

.task-subtasks-dialog .subtask-add-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.light-mode .task-chat-dialog .mud-dialog-title,
.light-mode .task-subtasks-dialog .mud-dialog-title,
.light-mode .task-chat-dialog .mud-dialog-content,
.light-mode .task-subtasks-dialog .mud-dialog-content,
.light-mode .task-chat-dialog .mud-dialog-actions,
.light-mode .task-subtasks-dialog .mud-dialog-actions {
    background: #FFFFFF !important;
    color: #111827 !important;
}

.light-mode .task-chat-dialog .mud-dialog-actions,
.light-mode .task-subtasks-dialog .mud-dialog-actions {
    border-top: 1px solid #E5E7EB !important;
}

.light-mode .task-chat-dialog .mud-input-root,
.light-mode .task-chat-dialog .mud-input,
.light-mode .task-chat-dialog textarea,
.light-mode .task-subtasks-dialog .mud-input-root,
.light-mode .task-subtasks-dialog .mud-input,
.light-mode .task-subtasks-dialog input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

.light-mode .task-chat-dialog .mud-input-outlined-border,
.light-mode .task-subtasks-dialog .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
}

.light-mode .task-chat-dialog textarea::placeholder,
.light-mode .task-subtasks-dialog input::placeholder {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    opacity: 1 !important;
}

.light-mode .task-subtasks-dialog .subtask-tree {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-mode .task-subtasks-dialog .subtask-root {
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
}

.light-mode .task-subtasks-dialog .subtask-tree-item {
    background: #F8FAFC !important;
    border: 1px solid #E5E7EB !important;
}

.light-mode .task-subtasks-dialog .subtask-root b,
.light-mode .task-subtasks-dialog .subtask-tree-item b {
    color: #111827 !important;
}

.light-mode .task-subtasks-dialog .subtask-root span,
.light-mode .task-subtasks-dialog .subtask-tree-item span {
    color: #64748B !important;
}

.light-mode .task-subtasks-dialog .subtask-add-panel {
    border-top: 1px solid #E5E7EB !important;
}
/* -------------------------------------------------
   Task work dialogs: Chat / SubTasks / Attachments / History
   Fix dark + light mode consistency
-------------------------------------------------- */

/* Dialog shell */
.task-work-dialog .mud-dialog {
    background: #0B1220 !important;
    color: #F8FAFC !important;
    overflow: hidden;
}

/* Header */
.task-work-dialog .mud-dialog-title {
    background: #0B1220 !important;
    color: #F8FAFC !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    padding: 22px 28px !important;
}

/* Content */
.task-work-dialog .mud-dialog-content {
    background: #0B1220 !important;
    color: #F8FAFC !important;
    padding: 24px 28px !important;
    min-height: 520px;
}

/* Footer */
.task-work-dialog .mud-dialog-actions {
    background: #0B1220 !important;
    color: #F8FAFC !important;
    border-top: 1px solid rgba(148, 163, 184, .16) !important;
    padding: 14px 20px !important;
}

/* Close X button */
.task-work-dialog .mud-dialog-title .mud-button-root,
.task-work-dialog .mud-dialog-title .mud-icon-button,
.task-work-dialog .mud-dialog-title .mud-icon-root {
    color: #CBD5E1 !important;
}

/* Dialog title text */
.task-work-dialog .task-dialog-title h2 {
    color: #F8FAFC !important;
    margin: 0;
}

.task-work-dialog .task-dialog-title p {
    color: #93A4BE !important;
    margin: 6px 0 0;
}

.task-work-dialog .task-dialog-title b {
    color: #BFDBFE !important;
}

/* Empty state */
.task-work-dialog .empty-state {
    background: rgba(15, 23, 42, .55) !important;
    border: 1px dashed rgba(148, 163, 184, .26) !important;
    color: #94A3B8 !important;
}

/* Inputs inside dialogs */
.task-work-dialog .mud-input-root,
.task-work-dialog .mud-input,
.task-work-dialog textarea,
.task-work-dialog input {
    color: #F8FAFC !important;
    -webkit-text-fill-color: #F8FAFC !important;
}

    .task-work-dialog textarea::placeholder,
    .task-work-dialog input::placeholder {
        color: #94A3B8 !important;
        -webkit-text-fill-color: #94A3B8 !important;
        opacity: 1;
    }

.task-work-dialog .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, .35) !important;
}

/* Close button in footer */
.task-work-dialog .mud-dialog-actions .mud-button-outlined {
    color: #F8FAFC !important;
    border-color: rgba(148, 163, 184, .45) !important;
}

    .task-work-dialog .mud-dialog-actions .mud-button-outlined:hover {
        background: rgba(148, 163, 184, .10) !important;
    }

/* Chat */
.task-chat-dialog .task-chat-window {
    background: #0B1220 !important;
}

.task-chat-dialog .sticky-chat-input {
    background: #0B1220 !important;
    border-top: 1px solid rgba(148, 163, 184, .16) !important;
}

.task-chat-dialog .task-chat-bubble {
    background: rgba(15, 23, 42, .72) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
}

.task-chat-dialog .task-chat-top b {
    color: #F8FAFC !important;
}

.task-chat-dialog .task-chat-top span,
.task-chat-dialog .task-chat-bubble p {
    color: #CBD5E1 !important;
}

/* SubTasks */
.task-subtasks-dialog .subtask-tree {
    background: rgba(15, 23, 42, .55) !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
}

.task-subtasks-dialog .subtask-root {
    background: rgba(59, 130, 246, .12) !important;
    border: 1px solid rgba(59, 130, 246, .25) !important;
}

    .task-subtasks-dialog .subtask-root b,
    .task-subtasks-dialog .subtask-tree-item b {
        color: #F8FAFC !important;
    }

    .task-subtasks-dialog .subtask-root span,
    .task-subtasks-dialog .subtask-tree-item span {
        color: #93A4BE !important;
    }

.task-subtasks-dialog .subtask-tree-item {
    background: rgba(17, 24, 39, .72) !important;
    border: 1px solid rgba(148, 163, 184, .14) !important;
}

/* Attachments */
.task-attachments-dialog .task-upload-box,
.task-attachments-dialog .attachment-card,
.task-attachments-dialog .attachment-card.image-card {
    background: rgba(15, 23, 42, .72) !important;
    border: 1px dashed rgba(148, 163, 184, .28) !important;
    color: #CBD5E1 !important;
}

/* History */
.task-history-dialog .history-item {
    background: rgba(15, 23, 42, .72) !important;
    border: 1px solid rgba(148, 163, 184, .14) !important;
    color: #CBD5E1 !important;
}

    .task-history-dialog .history-item b {
        color: #F8FAFC !important;
    }

    .task-history-dialog .history-item span {
        color: #94A3B8 !important;
    }

/* -------------------------------------------------
   Light mode version
-------------------------------------------------- */

.light-mode .task-work-dialog .mud-dialog,
.light-mode .task-work-dialog .mud-dialog-title,
.light-mode .task-work-dialog .mud-dialog-content,
.light-mode .task-work-dialog .mud-dialog-actions {
    background: #FFFFFF !important;
    color: #111827 !important;
}

.light-mode .task-work-dialog .mud-dialog-title {
    border-bottom: 1px solid #E5E7EB !important;
}

.light-mode .task-work-dialog .mud-dialog-actions {
    border-top: 1px solid #E5E7EB !important;
}

.light-mode .task-work-dialog .task-dialog-title h2 {
    color: #111827 !important;
}

.light-mode .task-work-dialog .task-dialog-title p {
    color: #64748B !important;
}

.light-mode .task-work-dialog .task-dialog-title b {
    color: #2563EB !important;
}

.light-mode .task-work-dialog .mud-dialog-title .mud-icon-root,
.light-mode .task-work-dialog .mud-dialog-title .mud-icon-button {
    color: #475569 !important;
}

.light-mode .task-work-dialog .empty-state {
    background: #F8FAFC !important;
    border: 1px dashed #CBD5E1 !important;
    color: #64748B !important;
}

.light-mode .task-work-dialog .mud-input-root,
.light-mode .task-work-dialog .mud-input,
.light-mode .task-work-dialog textarea,
.light-mode .task-work-dialog input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

    .light-mode .task-work-dialog textarea::placeholder,
    .light-mode .task-work-dialog input::placeholder {
        color: #94A3B8 !important;
        -webkit-text-fill-color: #94A3B8 !important;
    }

.light-mode .task-work-dialog .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
}

.light-mode .task-work-dialog .mud-dialog-actions .mud-button-outlined {
    color: #111827 !important;
    border-color: #CBD5E1 !important;
}

/* Light chat */
.light-mode .task-chat-dialog .task-chat-window,
.light-mode .task-chat-dialog .sticky-chat-input {
    background: #FFFFFF !important;
}

.light-mode .task-chat-dialog .task-chat-bubble {
    background: #F8FAFC !important;
    border: 1px solid #E5E7EB !important;
}

.light-mode .task-chat-dialog .task-chat-top b {
    color: #111827 !important;
}

.light-mode .task-chat-dialog .task-chat-top span,
.light-mode .task-chat-dialog .task-chat-bubble p {
    color: #475569 !important;
}

/* Light subtasks */
.light-mode .task-subtasks-dialog .subtask-tree {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-mode .task-subtasks-dialog .subtask-root {
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
}

    .light-mode .task-subtasks-dialog .subtask-root b,
    .light-mode .task-subtasks-dialog .subtask-tree-item b {
        color: #111827 !important;
    }

    .light-mode .task-subtasks-dialog .subtask-root span,
    .light-mode .task-subtasks-dialog .subtask-tree-item span {
        color: #64748B !important;
    }

.light-mode .task-subtasks-dialog .subtask-tree-item {
    background: #F8FAFC !important;
    border: 1px solid #E5E7EB !important;
}

/* Light attachments */
.light-mode .task-attachments-dialog .task-upload-box,
.light-mode .task-attachments-dialog .attachment-card,
.light-mode .task-attachments-dialog .attachment-card.image-card {
    background: #F8FAFC !important;
    border: 1px dashed #CBD5E1 !important;
    color: #475569 !important;
}

/* Light history */
.light-mode .task-history-dialog .history-item {
    background: #F8FAFC !important;
    border: 1px solid #E5E7EB !important;
    color: #334155 !important;
}

    .light-mode .task-history-dialog .history-item b {
        color: #111827 !important;
    }

    .light-mode .task-history-dialog .history-item span {
        color: #64748B !important;
    }

/* -------------------------------------------------
   Task dialogs theme based on MudTheme palette
   Works automatically for dark/light mode
-------------------------------------------------- */

.task-work-dialog .mud-dialog {
    overflow: hidden;
    border-radius: 18px !important;
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-divider)) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28) !important;
}

.task-work-dialog .mud-dialog-title {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
    padding: 22px 28px !important;
}

.task-work-dialog .mud-dialog-content {
    background: var(--mud-palette-background) !important;
    color: var(--mud-palette-text-primary) !important;
    padding: 24px 28px !important;
    min-height: 520px;
}

.task-work-dialog .mud-dialog-actions {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-top: 1px solid var(--mud-palette-divider) !important;
    padding: 14px 20px !important;
}

.task-work-dialog .task-dialog-title h2 {
    margin: 0;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 900;
}

.task-work-dialog .task-dialog-title p {
    margin: 6px 0 0;
    color: var(--mud-palette-text-secondary) !important;
}

.task-work-dialog .task-dialog-title b {
    color: var(--mud-palette-primary) !important;
}

.task-work-dialog .mud-dialog-title .mud-icon-root,
.task-work-dialog .mud-dialog-title .mud-icon-button {
    color: var(--mud-palette-text-secondary) !important;
}

/* Inputs */
.task-work-dialog .mud-input-root,
.task-work-dialog .mud-input,
.task-work-dialog textarea,
.task-work-dialog input {
    color: var(--mud-palette-text-primary) !important;
    -webkit-text-fill-color: var(--mud-palette-text-primary) !important;
}

    .task-work-dialog textarea::placeholder,
    .task-work-dialog input::placeholder {
        color: var(--mud-palette-text-secondary) !important;
        -webkit-text-fill-color: var(--mud-palette-text-secondary) !important;
        opacity: .9;
    }

.task-work-dialog .mud-input-outlined-border {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-divider)) !important;
}

/* Footer buttons */
.task-work-dialog .mud-dialog-actions .mud-button-outlined {
    color: var(--mud-palette-text-primary) !important;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 16%, var(--mud-palette-divider)) !important;
}

    .task-work-dialog .mud-dialog-actions .mud-button-outlined:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent) !important;
    }

/* Empty state */
.task-work-dialog .empty-state {
    background: color-mix(in srgb, var(--mud-palette-surface) 86%, transparent) !important;
    border: 1px dashed color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-divider)) !important;
    color: var(--mud-palette-text-secondary) !important;
}

/* Author / creator chip */
.chat-author-chip {
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--mud-palette-surface) 90%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-divider));
}

    .chat-author-chip span {
        display: block;
        color: var(--mud-palette-text-secondary);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .chat-author-chip b {
        display: block;
        color: var(--mud-palette-text-primary);
        font-size: 13px;
    }

/* Chat dialog */
.task-chat-dialog .task-chat-window {
    background: transparent !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-chat-dialog .sticky-chat-input {
    background: var(--mud-palette-background) !important;
    border-top: 1px solid var(--mud-palette-divider) !important;
    margin-top: 18px;
    padding-top: 18px;
}

.task-chat-dialog .task-chat-message {
    gap: 14px;
}

.task-chat-dialog .task-chat-bubble {
    background: var(--mud-palette-surface) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-divider)) !important;
    color: var(--mud-palette-text-primary) !important;
}

.task-chat-dialog .task-chat-top b {
    color: var(--mud-palette-text-primary) !important;
}

.task-chat-dialog .task-chat-top span,
.task-chat-dialog .task-chat-bubble p {
    color: var(--mud-palette-text-secondary) !important;
}

/* SubTasks dialog */
.task-subtasks-dialog .subtask-tree {
    background: color-mix(in srgb, var(--mud-palette-surface) 86%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-divider)) !important;
}

.task-subtasks-dialog .subtask-root {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 24%, transparent) !important;
}

    .task-subtasks-dialog .subtask-root b,
    .task-subtasks-dialog .subtask-tree-item b {
        color: var(--mud-palette-text-primary) !important;
    }

    .task-subtasks-dialog .subtask-root span,
    .task-subtasks-dialog .subtask-tree-item span {
        color: var(--mud-palette-text-secondary) !important;
    }

.task-subtasks-dialog .subtask-tree-item {
    background: var(--mud-palette-surface) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-divider)) !important;
}

/* Attachments dialog */
.task-attachments-dialog .task-upload-box,
.task-attachments-dialog .attachment-card,
.task-attachments-dialog .attachment-card.image-card {
    background: var(--mud-palette-surface) !important;
    border: 1px dashed color-mix(in srgb, var(--mud-palette-primary) 16%, var(--mud-palette-divider)) !important;
    color: var(--mud-palette-text-secondary) !important;
}

    .task-attachments-dialog .attachment-card b,
    .task-attachments-dialog .attachment-card.image-card b {
        color: var(--mud-palette-text-primary) !important;
    }

    .task-attachments-dialog .attachment-card small,
    .task-attachments-dialog .attachment-card.image-card small {
        color: var(--mud-palette-text-secondary) !important;
    }

/* History dialog */
.task-history-dialog .history-item {
    background: var(--mud-palette-surface) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-divider)) !important;
    color: var(--mud-palette-text-secondary) !important;
}

    .task-history-dialog .history-item b {
        color: var(--mud-palette-text-primary) !important;
    }

    .task-history-dialog .history-item span {
        color: var(--mud-palette-text-secondary) !important;
    }


.overview-management-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: var(--mud-palette-surface) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-divider)) !important;
}

.overview-management-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

    .overview-management-header h4 {
        margin: 4px 0 0;
        color: var(--mud-palette-text-primary) !important;
        font-size: 16px;
        font-weight: 900;
    }

.overview-management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

    .overview-management-grid > div {
        min-width: 0;
    }

.overview-management-card .mud-input-root,
.overview-management-card .mud-input,
.overview-management-card textarea {
    color: var(--mud-palette-text-primary) !important;
    -webkit-text-fill-color: var(--mud-palette-text-primary) !important;
}

    .overview-management-card textarea::placeholder {
        color: var(--mud-palette-text-secondary) !important;
        -webkit-text-fill-color: var(--mud-palette-text-secondary) !important;
    }

.overview-management-card .mud-input-outlined-border {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-divider)) !important;
}

@media (max-width: 900px) {
    .overview-management-grid {
        grid-template-columns: 1fr;
    }

    .overview-management-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.overview-management-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: var(--mud-palette-surface) !important;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-divider)) !important;
}

.overview-management-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

    .overview-management-header h4 {
        margin: 4px 0 0;
        color: var(--mud-palette-text-primary) !important;
        font-size: 16px;
        font-weight: 900;
    }

.overview-management-grid.three {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.overview-management-grid > div {
    min-width: 0;
}

@media (max-width: 1100px) {
    .overview-management-grid.three {
        grid-template-columns: 1fr;
    }

    .overview-management-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.task-data-grid .mud-table-cell {
    padding: 8px 10px !important;
    vertical-align: middle;
}

.task-data-grid .mud-table-row {
    height: 58px;
}

.task-title-cell.compact {
    gap: 8px;
    align-items: flex-start;
    min-width: 360px;
    max-width: 460px;
}

.task-title-text {
    min-width: 0;
}

    .task-title-text span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.25;
        color: #94A3B8;
    }

.task-title-button {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-cell {
    gap: 6px;
}

    .activity-cell span {
        padding: 3px 6px;
        font-size: 11px;
    }

.assignee {
    gap: 7px;
}

.avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.badge {
    padding: 4px 8px;
    font-size: 11px;
}

.progress-cell {
    min-width: 76px;
}

.progress-track.small {
    width: 76px;
    height: 7px;
}
.notify-user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 8px 0 18px;
}

.notify-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.notify-user-row input {
    width: 16px;
    height: 16px;
    accent-color: #60a5fa;
}

.notify-user-row small {
    display: block;
    opacity: 0.72;
    margin-top: 2px;
}

/* Compact notify people selector inside task form */
.notify-selected-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
    padding: 10px;
    min-height: 46px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.22);
}

.notify-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid rgba(96, 165, 250, 0.26);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.75);
}

.notify-selected-chip .mini-avatar {
    flex: 0 0 auto;
}

.notify-selected-text {
    min-width: 0;
    display: grid;
    line-height: 1.15;
}

.notify-selected-text b,
.notify-selected-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notify-selected-text small {
    opacity: 0.7;
    font-size: 11px;
}

.notify-selected-chip button {
    border: none;
    background: rgba(148, 163, 184, 0.14);
    color: rgba(226, 232, 240, 0.95);
    width: 22px;
    height: 22px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 18px;
    font-size: 16px;
}

.notify-selected-chip button:hover {
    background: rgba(248, 113, 113, 0.25);
}

.notify-add-button {
    margin: 0 0 10px;
}

.notify-picker-panel {
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.34);
}

.notify-search-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    outline: none;
    background: rgba(2, 6, 23, 0.36);
}

.notify-search-input:focus {
    border-color: rgba(96, 165, 250, 0.55);
}

.notify-picker-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.notify-picker-row {
    width: 100%;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    color: inherit;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

.notify-picker-row:hover {
    border-color: rgba(96, 165, 250, 0.44);
    background: rgba(30, 41, 59, 0.68);
}

.notify-picker-row.selected {
    border-color: rgba(34, 197, 94, 0.42);
    background: rgba(22, 101, 52, 0.22);
}

.notify-picker-row b,
.notify-picker-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notify-picker-row small {
    opacity: 0.7;
    margin-top: 2px;
}

.notify-add-sign {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.16);
    font-weight: 800;
}

.notify-picker-row.selected .notify-add-sign {
    background: rgba(34, 197, 94, 0.18);
}

/* Review/details notification info */
.task-notify-review-card {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.28);
}

.task-notify-review-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.task-notify-review-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.42);
}

.task-notify-review-row b,
.task-notify-review-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-notify-review-row small {
    opacity: 0.72;
}

.task-notify-role {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

/* Task-level reminder UI */
.task-details-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.task-reminder-review-card {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.08);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.task-reminder-review-card:hover {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.13);
}

.task-reminder-review-card > div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.task-reminder-review-card small {
    display: block;
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.72);
}

.task-reminder-create-card,
.task-reminder-list-card {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.28);
    margin-bottom: 14px;
}

.task-reminder-targets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 12px 0 14px;
}

.task-reminder-targets > span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(226, 232, 240, 0.72);
}

.task-reminder-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 10px;
}

.task-reminder-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.task-reminder-row.upcoming {
    border-color: rgba(251, 191, 36, 0.22);
}

.task-reminder-row.sent {
    opacity: 0.65;
}

.task-reminder-row b,
.task-reminder-row small,
.task-reminder-row span {
    display: block;
}

.task-reminder-row small {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.72);
}

.task-reminder-row span {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(147, 197, 253, 0.9);
}

.task-reminder-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-reminder-row-actions > span {
    margin: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.14);
    font-weight: 800;
}

/* Task timeline / recurring reminders */
.task-timeline-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.task-timeline-list {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}

.task-timeline-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    position: relative;
}

.task-timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 38px;
    bottom: -12px;
    width: 2px;
    background: rgba(148, 163, 184, .35);
}

.task-timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, .10);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, .16);
    z-index: 1;
}

.task-timeline-content {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(226, 232, 240, .9);
}

.task-timeline-content > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.task-timeline-content b {
    color: #0f172a;
}

.task-timeline-content span,
.task-timeline-content small {
    color: #64748b;
    font-size: .78rem;
}

.task-timeline-content p {
    margin: 5px 0 3px;
    color: #334155;
}

.task-reminder-repeat {
    display: inline-flex !important;
    width: fit-content;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .10);
    color: #4338ca !important;
    font-size: .72rem !important;
    font-weight: 700;
}

.task-details-title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-overview-dialog .task-timeline-card {
    margin: 18px 0;
    border: 1px solid rgba(99, 102, 241, .22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.task-overview-dialog .task-timeline-card .overview-widget-title {
    align-items: center;
    gap: 8px;
}

.task-overview-dialog .task-timeline-card .overview-widget-title .mud-button-root {
    margin-left: auto;
}

/* -------------------------------------------------
   Task Details polish: better reminder action + real theme-aware dialogs
   This block uses MudBlazor CSS variables, so dialogs look correct in both day and night mode
   even when MudDialog is rendered outside the app-shell element.
-------------------------------------------------- */
.task-details-dialog,
.task-overview-dialog,
.task-work-dialog {
    --tc-dialog-bg: var(--mud-palette-background);
    --tc-dialog-surface: var(--mud-palette-surface);
    --tc-dialog-text: var(--mud-palette-text-primary);
    --tc-dialog-muted: var(--mud-palette-text-secondary);
    --tc-dialog-border: var(--mud-palette-lines-default);
    --tc-dialog-primary: var(--mud-palette-primary);
}

.task-details-dialog .mud-dialog,
.task-overview-dialog .mud-dialog,
.task-work-dialog .mud-dialog {
    overflow: hidden;
    border-radius: 22px !important;
    background: var(--tc-dialog-surface) !important;
    color: var(--tc-dialog-text) !important;
    border: 1px solid var(--tc-dialog-border) !important;
    box-shadow: 0 26px 80px rgba(2, 6, 23, .32) !important;
}

.task-details-dialog .mud-dialog-title,
.task-overview-dialog .mud-dialog-title,
.task-work-dialog .mud-dialog-title {
    background: var(--tc-dialog-surface) !important;
    color: var(--tc-dialog-text) !important;
    border-bottom: 1px solid var(--tc-dialog-border) !important;
    padding: 20px 26px !important;
}

.task-details-dialog .mud-dialog-content,
.task-overview-dialog .mud-dialog-content,
.task-work-dialog .mud-dialog-content {
    background: var(--tc-dialog-bg) !important;
    color: var(--tc-dialog-text) !important;
    padding: 22px 26px !important;
}

.task-details-dialog .mud-dialog-actions,
.task-overview-dialog .mud-dialog-actions,
.task-work-dialog .mud-dialog-actions {
    background: var(--tc-dialog-surface) !important;
    color: var(--tc-dialog-text) !important;
    border-top: 1px solid var(--tc-dialog-border) !important;
    padding: 12px 20px !important;
}

.task-details-titlebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.task-details-titlebar h2 {
    color: var(--tc-dialog-text) !important;
    margin: 0;
}

.task-details-titlebar p {
    color: var(--tc-dialog-muted) !important;
    margin: 5px 0 0;
}

.task-details-title-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    min-width: fit-content;
}

.task-header-action.mud-button-root {
    height: 34px;
    border-radius: 999px !important;
    text-transform: none !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
}

.task-header-action.reminder-action.mud-button-root {
    box-shadow: 0 10px 26px rgba(37, 99, 235, .22) !important;
}

.task-header-action .mud-icon-root {
    font-size: 18px !important;
}

.overview-stage-card,
.overview-management-card,
.task-overview-card,
.overview-widget-card,
.task-timeline-card,
.task-notify-review-card,
.task-reminder-create-card,
.task-reminder-list-card,
.task-reminder-row,
.task-timeline-content,
.overview-mini-grid div {
    background: var(--tc-dialog-surface) !important;
    color: var(--tc-dialog-text) !important;
    border-color: var(--tc-dialog-border) !important;
}

.overview-stage-card {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--mud-palette-primary) 10%, var(--tc-dialog-surface)),
        var(--tc-dialog-surface)) !important;
}

.overview-stage-card h3,
.overview-management-card h4,
.overview-widget-title b,
.overview-mini-grid b,
.task-timeline-content b,
.task-notify-review-row b,
.task-reminder-row b {
    color: var(--tc-dialog-text) !important;
}

.overview-stage-card p,
.task-description,
.overview-mini-grid span,
.task-timeline-content p,
.task-timeline-content span,
.task-timeline-content small,
.task-notify-review-row small,
.task-reminder-row small,
.task-reminder-review-card small,
.empty-state,
.empty-state.compact {
    color: var(--tc-dialog-muted) !important;
}

.task-timeline-card {
    box-shadow: 0 18px 45px rgba(2, 6, 23, .12) !important;
}

.task-timeline-icon {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--tc-dialog-surface)) !important;
    color: var(--mud-palette-primary) !important;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 30%, var(--tc-dialog-border)) !important;
}

.task-timeline-item:not(:last-child)::before {
    background: color-mix(in srgb, var(--mud-palette-primary) 22%, var(--tc-dialog-border)) !important;
}

.task-reminder-review-card {
    background: color-mix(in srgb, #f59e0b 10%, var(--tc-dialog-surface)) !important;
    border-color: color-mix(in srgb, #f59e0b 36%, var(--tc-dialog-border)) !important;
    color: var(--tc-dialog-text) !important;
}

.task-reminder-review-card:hover {
    background: color-mix(in srgb, #f59e0b 15%, var(--tc-dialog-surface)) !important;
}

.task-overview-dialog .mud-input-root,
.task-overview-dialog .mud-input,
.task-overview-dialog .mud-select,
.task-work-dialog .mud-input-root,
.task-work-dialog .mud-input,
.task-work-dialog .mud-select,
.task-details-dialog .mud-input-root,
.task-details-dialog .mud-input,
.task-details-dialog .mud-select {
    color: var(--tc-dialog-text) !important;
}

.task-overview-dialog .mud-input-label,
.task-work-dialog .mud-input-label,
.task-details-dialog .mud-input-label {
    color: var(--tc-dialog-muted) !important;
}

.task-overview-dialog .mud-input-outlined-border,
.task-work-dialog .mud-input-outlined-border,
.task-details-dialog .mud-input-outlined-border {
    border-color: var(--tc-dialog-border) !important;
}

@media (max-width: 760px) {
    .task-details-titlebar {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-details-title-actions {
        width: 100%;
        justify-content: flex-start;
    }
}


/* Task details footer actions: left aligned workflow buttons, Close stays right */
.task-details-dialog .mud-dialog-actions,
.task-overview-dialog .mud-dialog-actions {
    justify-content: stretch !important;
}

.task-dialog-actions-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.task-dialog-actions-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
}

.task-dialog-actions-left .mud-button-root {
    text-transform: uppercase !important;
    font-weight: 800 !important;
}

@media (max-width: 760px) {
    .task-dialog-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .task-dialog-actions-left {
        width: 100%;
    }
}

/* -------------------------------------------------
   Timeline V2: colored real timeline, filters, SLA cards
-------------------------------------------------- */
.timeline-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timeline-filter-chip {
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 18%, var(--mud-palette-divider));
    background: color-mix(in srgb, var(--mud-palette-surface) 88%, transparent);
    color: var(--mud-palette-text-secondary);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: .16s ease;
}

.timeline-filter-chip:hover,
.timeline-filter-chip.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 16%, var(--mud-palette-surface));
    border-color: color-mix(in srgb, var(--mud-palette-primary) 48%, var(--mud-palette-divider));
    color: var(--mud-palette-primary);
}

.timeline-important-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-warning) 26%, var(--mud-palette-divider));
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, var(--mud-palette-surface));
    color: var(--mud-palette-text-secondary);
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.timeline-important-toggle input {
    accent-color: var(--mud-palette-warning);
}

.timeline-insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.timeline-insight-card {
    padding: 14px;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-divider));
}

.timeline-insight-card span,
.timeline-insight-card small {
    display: block;
    color: var(--mud-palette-text-secondary);
    font-size: .76rem;
}

.timeline-insight-card b {
    display: block;
    color: var(--mud-palette-text-primary);
    margin: 5px 0 2px;
    font-size: .98rem;
}

.timeline-insight-card.overdue {
    border-color: color-mix(in srgb, var(--mud-palette-error) 42%, var(--mud-palette-divider));
    background: color-mix(in srgb, var(--mud-palette-error) 9%, var(--mud-palette-surface));
}

.timeline-insight-card.escalate {
    border-color: color-mix(in srgb, var(--mud-palette-warning) 42%, var(--mud-palette-divider));
    background: color-mix(in srgb, var(--mud-palette-warning) 10%, var(--mud-palette-surface));
}

.timeline-date-group {
    position: sticky;
    top: 0;
    z-index: 3;
    width: fit-content;
    margin: 8px 0 2px 50px;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface));
    color: var(--mud-palette-primary);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 25%, var(--mud-palette-divider));
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.real-timeline-list {
    max-height: 58vh;
}

.timeline-kind-pill {
    display: inline-flex !important;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem !important;
    font-weight: 900;
    color: var(--event-color) !important;
    background: color-mix(in srgb, var(--event-color) 12%, var(--mud-palette-surface));
    border: 1px solid color-mix(in srgb, var(--event-color) 26%, transparent);
}

.timeline-event-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.timeline-author {
    display: block !important;
    margin-top: 4px;
    font-weight: 700;
}

.timeline-change-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 9px 0 4px;
    flex-wrap: wrap;
}

.timeline-change-row .old-value,
.timeline-change-row .new-value {
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .78rem !important;
    font-weight: 800;
}

.timeline-change-row .old-value {
    color: var(--mud-palette-text-secondary) !important;
    background: color-mix(in srgb, var(--mud-palette-lines-default) 45%, var(--mud-palette-surface));
}

.timeline-change-row .new-value {
    color: var(--event-color) !important;
    background: color-mix(in srgb, var(--event-color) 12%, var(--mud-palette-surface));
    border: 1px solid color-mix(in srgb, var(--event-color) 24%, transparent);
}

.task-timeline-item {
    --event-color: #3b82f6;
}

.task-timeline-item.timeline-kind-created { --event-color: #22c55e; }
.task-timeline-item.timeline-kind-status { --event-color: #3b82f6; }
.task-timeline-item.timeline-kind-reminder { --event-color: #f59e0b; }
.task-timeline-item.timeline-kind-chat { --event-color: #8b5cf6; }
.task-timeline-item.timeline-kind-files { --event-color: #06b6d4; }
.task-timeline-item.timeline-kind-assignment { --event-color: #eab308; }
.task-timeline-item.timeline-kind-priority { --event-color: #ef4444; }
.task-timeline-item.timeline-kind-due { --event-color: #f97316; }
.task-timeline-item.timeline-kind-system { --event-color: #64748b; }

.task-timeline-item .task-timeline-icon {
    color: var(--event-color) !important;
    background: color-mix(in srgb, var(--event-color) 13%, var(--mud-palette-surface)) !important;
    border-color: color-mix(in srgb, var(--event-color) 32%, var(--mud-palette-divider)) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color) 10%, transparent);
}

.task-timeline-item:not(:last-child)::before {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--event-color) 42%, var(--mud-palette-divider)),
        color-mix(in srgb, var(--mud-palette-primary) 16%, var(--mud-palette-divider))) !important;
}

@media (max-width: 900px) {
    .timeline-insights-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 560px) {
    .timeline-insights-grid {
        grid-template-columns: 1fr;
    }

    .timeline-event-head {
        flex-direction: column;
        gap: 4px;
    }
}

/* Task id badges in list and task review */
.task-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-id-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-surface));
    color: var(--mud-palette-primary);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 26%, var(--mud-palette-divider));
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.4;
    white-space: nowrap;
}

.task-id-badge.large {
    font-size: .82rem;
    padding: 3px 10px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Lookup pages: add status / priority */
.lookup-add-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) minmax(180px, 1fr) 120px auto;
    gap: 14px;
    align-items: end;
}

.lookup-add-panel h3 {
    margin: 0 0 4px;
    color: var(--mud-palette-text-primary);
}

.lookup-add-panel p {
    margin: 0;
    color: var(--mud-palette-text-secondary);
    font-size: .84rem;
}

.lookup-value-cell {
    display: grid;
    grid-template-columns: 110px minmax(150px, 1fr);
    gap: 10px;
    align-items: center;
}

@media (max-width: 980px) {
    .lookup-add-panel {
        grid-template-columns: 1fr;
    }

    .lookup-value-cell {
        grid-template-columns: 1fr;
    }
}

/* Professional task list look: dark rows + pill badges */
.task-data-grid .mud-table-cell,
.task-data-grid .mud-data-grid-cell {
    border-bottom: 1px solid rgba(148, 163, 184, .14) !important;
    color: #F8FAFC !important;
    vertical-align: middle !important;
}

.task-data-grid .mud-table-row:hover,
.task-data-grid .mud-data-grid-row:hover {
    background: rgba(59, 130, 246, .055) !important;
}

.task-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-title-button {
    border: 0;
    background: transparent;
    color: #F8FAFC;
    padding: 0;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.task-title-button:hover {
    color: #93C5FD;
    text-decoration: underline;
}

.project-cell,
.person-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.project-cell b,
.person-cell b {
    color: #F8FAFC;
    font-weight: 800;
    white-space: nowrap;
}

.pill-badge,
.badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .50);
}

.pill-badge::before,
.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 14px currentColor;
}

.pill-badge.status.new,
.badge.status.new {
    color: #38BDF8;
    background: rgba(14, 165, 233, .13);
    border-color: rgba(14, 165, 233, .45);
}

.pill-badge.status.inprogress,
.badge.status.inprogress {
    color: #F59E0B;
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .50);
}

.pill-badge.status.review,
.badge.status.review {
    color: #A78BFA;
    background: rgba(139, 92, 246, .12);
    border-color: rgba(139, 92, 246, .45);
}

.pill-badge.status.blocked,
.badge.status.blocked {
    color: #FF4D57;
    background: rgba(239, 68, 68, .13);
    border-color: rgba(239, 68, 68, .50);
}

.pill-badge.status.done,
.badge.status.done {
    color: #22C55E;
    background: rgba(34, 197, 94, .13);
    border-color: rgba(34, 197, 94, .45);
}

.pill-badge.priority.low,
.badge.priority.low {
    color: #22C55E;
    background: rgba(34, 197, 94, .10);
    border-color: rgba(34, 197, 94, .38);
}

.pill-badge.priority.medium,
.badge.priority.medium {
    color: #F59E0B;
    background: rgba(245, 158, 11, .10);
    border-color: rgba(245, 158, 11, .48);
}

.pill-badge.priority.high,
.badge.priority.high,
.pill-badge.priority.critical,
.badge.priority.critical {
    color: #FF4D57;
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .50);
}

.avatar.muted {
    background: linear-gradient(135deg, #64748B, #8B5CF6);
}

.activity-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.activity-pills span {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #CBD5E1;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .10);
    border: 1px solid rgba(148, 163, 184, .16);
    font-size: 12px;
    font-weight: 800;
}

.progress-cell {
    min-width: 86px;
    display: grid;
    gap: 6px;
}

.progress-cell b {
    color: #E5E7EB;
    font-weight: 900;
    font-size: 12px;
}

.progress-track.mini {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: #38BDF8;
}

.progress-fill.done { background: #22C55E; }
.progress-fill.inprogress,
.progress-fill.review { background: #F59E0B; }
.progress-fill.blocked { background: #EF4444; }

/* Clean request / response / review task details layout */
.clean-task-details-dialog .mud-dialog-title { padding: 0; }
.clean-task-details-dialog .mud-dialog-content { padding: 0 18px 18px; }
.clean-task-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.clean-task-header-main h2 {
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f8fafc;
}
.clean-task-header-main p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    color: #b8c5d8;
    font-size: .86rem;
}
.clean-task-header-main p b { color: #f8fafc; }
.clean-task-header-actions { display: flex; gap: 10px; align-items: center; }
.clean-detail-tabs { padding-top: 16px; }
.clean-detail-tabs .mud-tabs-toolbar { background: rgba(2, 8, 23, .28); border: 1px solid rgba(148, 163, 184, .14); border-radius: 14px; }
.clean-detail-tab-panel { padding: 18px 0 0; }
.clean-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, .16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(15, 37, 64, .72));
}
.clean-form-grid.form-mode { padding: 0; border: 0; background: transparent; }
.clean-info-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    min-height: 78px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 14px;
    background: rgba(2, 8, 23, .32);
}
.clean-info-card.large { min-height: 118px; }
.clean-info-card.full { grid-column: 1 / -1; }
.clean-info-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(37, 99, 235, .22);
    color: #60a5fa;
}
.clean-info-icon.gold { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.clean-info-card span,
.clean-field-block label {
    display: block;
    color: #93a4bb;
    font-size: .78rem;
    margin-bottom: 4px;
}
.clean-info-card b { color: #f8fafc; display: block; line-height: 1.35; }
.clean-info-card small { color: #94a3b8; display: block; margin-top: 4px; }
.clean-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.clean-person-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, .25);
    background: rgba(37, 99, 235, .16);
    color: #dbeafe !important;
}
.clean-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, .16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(15, 37, 64, .72));
}
.clean-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.clean-section-title h3 { margin: 0; color: #f8fafc; }
.clean-field-block {
    padding: 8px 0;
}
.effort-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.clean-list-panel {
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, .16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(15, 37, 64, .72));
}
.clean-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, .1);
    color: #cbd5e1;
}
.clean-list-row b { color: #f8fafc; }
@media (max-width: 900px) {
    .clean-form-grid { grid-template-columns: 1fr; }
    .clean-task-header { flex-direction: column; }
    .clean-task-header-actions { width: 100%; justify-content: flex-end; }
}

/* Review summary icon accents */
.clean-info-icon.request { background: rgba(37, 99, 235, .22); color: #60a5fa; }
.clean-info-icon.response { background: rgba(14, 165, 233, .18); color: #38bdf8; }
.clean-info-icon.people { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
.clean-info-icon.owner { background: rgba(20, 184, 166, .18); color: #5eead4; }
.clean-info-icon.status { background: rgba(59, 130, 246, .18); color: #60a5fa; }
.clean-info-icon.progress { background: rgba(14, 165, 233, .18); color: #38bdf8; }
.clean-info-icon.done { background: rgba(34, 197, 94, .18); color: #4ade80; }
.clean-info-icon.warning { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.clean-info-icon.danger { background: rgba(239, 68, 68, .18); color: #f87171; }
.clean-info-icon.purple { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
.clean-info-icon.date { background: rgba(14, 165, 233, .16); color: #67e8f9; }
.clean-info-icon.chat { background: rgba(56, 189, 248, .15); color: #7dd3fc; }
.clean-info-icon.reminder { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.clean-info-icon.count { background: rgba(168, 85, 247, .16); color: #d8b4fe; }
.clean-info-icon.muted { background: rgba(100, 116, 139, .18); color: #cbd5e1; }
.nudge-summary-grid { grid-template-columns: 1fr 1fr; }

/* Light/dark safe overrides for clean review/response/task details */
.light-mode .clean-task-header {
    background: var(--mud-palette-surface) !important;
    border-bottom-color: var(--mud-palette-divider) !important;
}
.light-mode .clean-task-header-main h2,
.light-mode .clean-task-header-main p b,
.light-mode .clean-section-title h3,
.light-mode .clean-info-card b,
.light-mode .clean-list-row b {
    color: var(--mud-palette-text-primary) !important;
}
.light-mode .clean-task-header-main p,
.light-mode .clean-info-card span,
.light-mode .clean-field-block label,
.light-mode .clean-info-card small,
.light-mode .clean-list-row {
    color: var(--mud-palette-text-secondary) !important;
}
.light-mode .clean-detail-tabs .mud-tabs-toolbar,
.light-mode .clean-form-grid,
.light-mode .clean-edit-form,
.light-mode .clean-list-panel,
.light-mode .clean-info-card {
    background: var(--mud-palette-surface) !important;
    border-color: var(--mud-palette-divider) !important;
}
.light-mode .clean-info-card {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06) !important;
}
.light-mode .clean-person-chip {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent) !important;
    border-color: color-mix(in srgb, var(--mud-palette-primary) 22%, var(--mud-palette-divider)) !important;
    color: var(--mud-palette-primary) !important;
}
.light-mode .clean-info-icon.request,
.light-mode .clean-info-icon.status,
.light-mode .clean-info-icon.reminder {
    background: color-mix(in srgb, #2563eb 12%, transparent) !important;
    color: #2563eb !important;
}
.light-mode .clean-info-icon.response,
.light-mode .clean-info-icon.progress,
.light-mode .clean-info-icon.chat,
.light-mode .clean-info-icon.date {
    background: color-mix(in srgb, #0284c7 12%, transparent) !important;
    color: #0284c7 !important;
}
.light-mode .clean-info-icon.people,
.light-mode .clean-info-icon.purple,
.light-mode .clean-info-icon.count {
    background: color-mix(in srgb, #7c3aed 12%, transparent) !important;
    color: #7c3aed !important;
}
.light-mode .clean-info-icon.owner,
.light-mode .clean-info-icon.done {
    background: color-mix(in srgb, #059669 12%, transparent) !important;
    color: #059669 !important;
}
.light-mode .clean-info-icon.warning,
.light-mode .clean-info-icon.gold {
    background: color-mix(in srgb, #d97706 14%, transparent) !important;
    color: #d97706 !important;
}
.light-mode .clean-info-icon.danger {
    background: color-mix(in srgb, #dc2626 12%, transparent) !important;
    color: #dc2626 !important;
}
.light-mode .clean-info-icon.muted {
    background: color-mix(in srgb, #64748b 12%, transparent) !important;
    color: #64748b !important;
}

/* 2026-06-24 fix: clean task details must be readable in light and dark mode.
   Mud dialogs render outside .app-shell, so we use body:has(.light-mode). */
body:has(.light-mode) .clean-task-details-dialog .mud-dialog,
body:has(.light-mode) .clean-task-details-dialog .mud-dialog-title,
body:has(.light-mode) .clean-task-details-dialog .mud-dialog-content {
    background: #ffffff !important;
    color: #0f172a !important;
}

body:has(.light-mode) .clean-task-header {
    background: #ffffff !important;
    border-bottom-color: #e2e8f0 !important;
}

body:has(.light-mode) .clean-task-header-main h2,
body:has(.light-mode) .clean-task-header-main p b,
body:has(.light-mode) .review-panel-title,
body:has(.light-mode) .review-panel-title b,
body:has(.light-mode) .clean-info-card b,
body:has(.light-mode) .clean-info-card strong,
body:has(.light-mode) .clean-info-card .value {
    color: #0f172a !important;
}

body:has(.light-mode) .clean-task-header-main p,
body:has(.light-mode) .clean-task-header-main span,
body:has(.light-mode) .clean-info-card span,
body:has(.light-mode) .clean-info-card small,
body:has(.light-mode) .clean-info-card label {
    color: #475569 !important;
}

body:has(.light-mode) .clean-detail-tabs .mud-tabs-toolbar {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body:has(.light-mode) .clean-form-grid,
body:has(.light-mode) .review-summary-grid,
body:has(.light-mode) .review-followup-panel {
    background: #f8fafc !important;
    border-color: #dbeafe !important;
}

body:has(.light-mode) .clean-info-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

body:has(.light-mode) .clean-info-icon {
    background: #dbeafe !important;
    color: #2563eb !important;
}

body:has(.light-mode) .clean-info-icon.gold { background: #fef3c7 !important; color: #d97706 !important; }
body:has(.light-mode) .clean-info-icon.green { background: #dcfce7 !important; color: #16a34a !important; }
body:has(.light-mode) .clean-info-icon.purple { background: #ede9fe !important; color: #7c3aed !important; }
body:has(.light-mode) .clean-info-icon.red { background: #fee2e2 !important; color: #dc2626 !important; }
body:has(.light-mode) .clean-info-icon.cyan { background: #cffafe !important; color: #0891b2 !important; }

/* Meeting timeline additions: responses and subtasks */
.timeline-related-title {
    margin: 8px 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: rgba(226, 232, 240, .9);
}

.task-timeline-item.timeline-kind-responses { --event-color: #38bdf8; }
.task-timeline-item.timeline-kind-subtasks { --event-color: #a78bfa; }

.light-mode .timeline-related-title {
    color: rgba(15, 23, 42, .82);
}

.response-notify-box {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(92, 128, 255, 0.28);
    border-radius: 14px;
    background: rgba(25, 38, 74, 0.45);
}

.response-notify-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #eef3ff;
    margin-bottom: 4px;
}

.response-notify-box p {
    margin: 0 0 8px;
    color: rgba(226, 233, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.35;
}

.response-notify-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
}

.light-mode .response-notify-box {
    background: rgba(244, 247, 255, 0.92);
    border-color: rgba(79, 112, 215, 0.24);
}

.light-mode .response-notify-title {
    color: #1e2a4a;
}

.light-mode .response-notify-box p {
    color: rgba(37, 48, 79, 0.72);
}


/* Smart Tags */
.smart-tags-editor {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.32);
    margin-bottom: 12px;
}

.smart-tag-chips,
.task-tags-row,
.board-tags-row,
.meeting-task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.smart-tag-chips { margin-bottom: 10px; }
.task-tags-row { margin-top: 7px; }
.board-tags-row { margin: 8px 0 6px; }
.meeting-task-tags { margin-top: 5px; }

.smart-tag-empty {
    color: #94a3b8;
    font-size: 0.82rem;
}

.smart-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.9);
    color: #e5e7eb;
    font-size: 0.82rem;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.smart-tag-chip.mini {
    padding: 4px 8px;
    font-size: 0.72rem;
    gap: 4px;
}

.smart-tag-chip.micro {
    padding: 3px 6px;
    font-size: 0.66rem;
    gap: 4px;
}

.smart-tag-chip button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0 0 0 2px;
    font-size: 1rem;
    line-height: 1;
    opacity: .8;
}

.smart-tag-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.smart-tag-suggestion {
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 9px 10px;
    background: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
    cursor: pointer;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.smart-tag-suggestion:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(30, 41, 59, 0.92);
}

.smart-tag-suggestion span { grid-row: span 2; font-size: 1.05rem; }
.smart-tag-suggestion b { font-size: 0.82rem; }
.smart-tag-suggestion small { color: #94a3b8; font-size: 0.68rem; }

.smart-tag-chip.customer, .smart-tag-suggestion.customer { background: rgba(59, 130, 246, 0.18); border-color: rgba(96, 165, 250, 0.38); }
.smart-tag-chip.engineering, .smart-tag-suggestion.engineering { background: rgba(14, 165, 233, 0.18); border-color: rgba(56, 189, 248, 0.38); }
.smart-tag-chip.production, .smart-tag-suggestion.production { background: rgba(34, 197, 94, 0.16); border-color: rgba(74, 222, 128, 0.35); }
.smart-tag-chip.purchasing, .smart-tag-suggestion.purchasing { background: rgba(245, 158, 11, 0.18); border-color: rgba(251, 191, 36, 0.38); }
.smart-tag-chip.it, .smart-tag-suggestion.it { background: rgba(99, 102, 241, 0.18); border-color: rgba(129, 140, 248, 0.38); }
.smart-tag-chip.bug, .smart-tag-suggestion.bug { background: rgba(239, 68, 68, 0.17); border-color: rgba(248, 113, 113, 0.38); }
.smart-tag-chip.feature, .smart-tag-suggestion.feature { background: rgba(168, 85, 247, 0.18); border-color: rgba(192, 132, 252, 0.38); }
.smart-tag-chip.request, .smart-tag-suggestion.request { background: rgba(20, 184, 166, 0.16); border-color: rgba(45, 212, 191, 0.34); }
.smart-tag-chip.critical, .smart-tag-suggestion.critical { background: rgba(220, 38, 38, 0.24); border-color: rgba(248, 113, 113, 0.5); }
.smart-tag-chip.waiting, .smart-tag-suggestion.waiting { background: rgba(234, 179, 8, 0.16); border-color: rgba(250, 204, 21, 0.35); }
.smart-tag-chip.drawing, .smart-tag-suggestion.drawing { background: rgba(6, 182, 212, 0.16); border-color: rgba(34, 211, 238, 0.35); }
.smart-tag-chip.parts, .smart-tag-suggestion.parts { background: rgba(251, 146, 60, 0.18); border-color: rgba(253, 186, 116, 0.38); }
.smart-tag-chip.ai, .smart-tag-suggestion.ai { background: rgba(217, 70, 239, 0.18); border-color: rgba(232, 121, 249, 0.38); }
.smart-tag-chip.followup, .smart-tag-suggestion.followup { background: rgba(244, 63, 94, 0.17); border-color: rgba(251, 113, 133, 0.36); }
.smart-tag-chip.meeting, .smart-tag-suggestion.meeting { background: rgba(124, 58, 237, 0.18); border-color: rgba(167, 139, 250, 0.38); }
.smart-tag-chip.quality, .smart-tag-suggestion.quality { background: rgba(34, 197, 94, 0.18); border-color: rgba(74, 222, 128, 0.38); }
.smart-tag-chip.safety, .smart-tag-suggestion.safety { background: rgba(245, 158, 11, 0.20); border-color: rgba(251, 191, 36, 0.42); }
.smart-tag-chip.quote, .smart-tag-suggestion.quote { background: rgba(14, 165, 233, 0.17); border-color: rgba(56, 189, 248, 0.36); }
.smart-tag-chip.approval, .smart-tag-suggestion.approval { background: rgba(168, 85, 247, 0.19); border-color: rgba(192, 132, 252, 0.40); }
.smart-tag-chip.warranty, .smart-tag-suggestion.warranty { background: rgba(100, 116, 139, 0.22); border-color: rgba(148, 163, 184, 0.38); }
.smart-tag-chip.custom, .smart-tag-suggestion.custom { background: rgba(71, 85, 105, 0.3); border-color: rgba(148, 163, 184, 0.35); }

.clean-task-tags { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 2px; }


/* Smart Tags horizontal fix for compact task list */
.task-title-text .task-description-line {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    color: #94A3B8;
}

.task-title-text .task-tags-row,
.task-tags-row,
.board-tags-row,
.meeting-task-tags,
.clean-task-tags {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
    min-width: 0;
}

.task-title-text .task-tags-row {
    margin-top: 6px !important;
    max-width: 100%;
}

.task-title-text .smart-tag-chip,
.task-tags-row .smart-tag-chip,
.board-tags-row .smart-tag-chip,
.meeting-task-tags .smart-tag-chip,
.clean-task-tags .smart-tag-chip {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.task-title-text .smart-tag-chip span,
.task-tags-row .smart-tag-chip span,
.board-tags-row .smart-tag-chip span,
.meeting-task-tags .smart-tag-chip span,
.clean-task-tags .smart-tag-chip span {
    display: inline !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    font-size: inherit !important;
    line-height: 1 !important;
    color: inherit !important;
}

.task-tags-row .smart-tag-chip.mini {
    padding: 3px 7px !important;
    font-size: .68rem !important;
}

/* Quick Filters Panel */
.quick-filters-panel {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.quick-filters-panel .filters-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-filters-panel .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-filters-panel .filter-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-filters-panel .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-filters-panel .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #D1D5DB;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.quick-filters-panel .filter-chip:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    color: #E5E7EB;
}

.quick-filters-panel .filter-chip-active {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
    color: #E9D5FF;
}

.quick-filters-panel .filter-chip-active:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5);
}

.quick-filters-panel .filter-chip-muted {
    background: transparent;
    border: 1px dashed rgba(148, 163, 184, 0.2);
    color: #6B7280;
    cursor: default;
}

.quick-filters-panel .filter-chip-muted:hover {
    background: transparent;
}

.quick-filters-panel .filter-name {
    font-weight: 500;
}

.quick-filters-panel .filter-count {
    background: rgba(148, 163, 184, 0.2);
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9CA3AF;
}

.quick-filters-panel .filter-chip-active .filter-count {
    background: rgba(168, 85, 247, 0.3);
    color: #D8B4FE;
}

.quick-filters-panel .filter-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.quick-filters-panel .btn-clear-filters {
    padding: 6px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    color: #FECACA;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-filters-panel .btn-clear-filters:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* Advanced Filters Panel Styles */
.advanced-filters-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.advanced-filters-header {
    width: 100%;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.5);
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: #F8FAFC;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.advanced-filters-header:hover {
    background: rgba(30, 41, 59, 0.7);
}

.advanced-filters-header .toggle-icon {
    display: inline-flex;
    align-items: center;
    min-width: 16px;
    color: #94A3B8;
}

.advanced-filters-header .header-title {
    flex: 1;
    text-align: left;
}

.advanced-filters-header .active-count {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 2px 8px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 999px;
    color: #D8B4FE;
    font-size: 0.8rem;
    font-weight: 600;
}

.advanced-filters-content {
    padding: 14px;
    background: rgba(15, 23, 42, 0.4);
}

/* Filter Group Wrapper */
.filter-group-wrapper {
    margin-bottom: 12px;
}

.filter-group-wrapper:last-child {
    margin-bottom: 0;
}

.filter-group-header {
    width: 100%;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 6px;
    color: #E5E7EB;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-group-header:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.12);
}

.filter-group-header .toggle-icon {
    display: inline-flex;
    align-items: center;
    min-width: 14px;
    color: #94A3B8;
    font-size: 0.8rem;
}

.filter-group-header .group-title {
    flex: 1;
    text-align: left;
}

.filter-group-header .group-count {
    color: #94A3B8;
    font-size: 0.85rem;
    font-weight: 500;
}

.filter-group-header + .filter-chips {
    margin-top: 10px;
    padding-left: 12px;
}

/* Filter Chips Container */
.advanced-filters-content .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.advanced-filters-content .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(71, 85, 105, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #D1D5DB;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.advanced-filters-content .filter-chip:hover {
    background: rgba(71, 85, 105, 0.25);
    border-color: rgba(148, 163, 184, 0.3);
    color: #E5E7EB;
}

.advanced-filters-content .filter-chip-active {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
    color: #E9D5FF;
}

.advanced-filters-content .filter-chip-active:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5);
}

.advanced-filters-content .filter-chip-show-more,
.advanced-filters-content .filter-chip-show-less {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #A5B4FC;
    font-weight: 500;
}

.advanced-filters-content .filter-chip-show-more:hover,
.advanced-filters-content .filter-chip-show-less:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #C7D2FE;
}

.advanced-filters-content .filter-name {
    font-weight: 500;
}

.advanced-filters-content .filter-count {
    background: rgba(148, 163, 184, 0.2);
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9CA3AF;
}

.advanced-filters-content .filter-chip-active .filter-count {
    background: rgba(168, 85, 247, 0.3);
    color: #D8B4FE;
}

/* Action Buttons */
.advanced-filters-content .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    margin-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.advanced-filters-content .btn-action {
    padding: 8px 14px;
    background: rgba(71, 85, 105, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #D1D5DB;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.advanced-filters-content .btn-action:hover {
    background: rgba(71, 85, 105, 0.25);
    border-color: rgba(148, 163, 184, 0.3);
    color: #E5E7EB;
}

.advanced-filters-content .btn-expand-all {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.25);
    color: #86EFAC;
}

.advanced-filters-content .btn-expand-all:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #A5F3FC;
}

.advanced-filters-content .btn-collapse-all {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.25);
    color: #D8B4FE;
}

.advanced-filters-content .btn-collapse-all:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: #F0E7FE;
}

.advanced-filters-content .btn-clear-filters {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #FECACA;
}

.advanced-filters-content .btn-clear-filters:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
}

/* Responsive design */
@media (max-width: 768px) {
    .quick-filters-panel .filters-container {
        gap: 12px;
    }

    .quick-filters-panel .filter-chips {
        gap: 6px;
    }

    .quick-filters-panel .filter-chip {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }

    .advanced-filters-panel {
        margin-bottom: 12px;
    }

    .advanced-filters-header {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .filter-group-header {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .advanced-filters-content .filter-chip {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }

    .advanced-filters-content .btn-action {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Advanced Filters compact redesign */
.advanced-filters-header .header-hint {
    color: #94A3B8;
    font-size: 0.82rem;
    font-weight: 500;
    margin-left: auto;
}

.advanced-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 10px;
}

.advanced-filter-toolbar .toolbar-title {
    color: #E5E7EB;
    font-size: 0.9rem;
    font-weight: 700;
}

.advanced-filter-toolbar .toolbar-subtitle {
    color: #94A3B8;
    font-size: 0.78rem;
    margin-top: 2px;
}

.advanced-filter-toolbar .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.active-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.16);
    border-radius: 10px;
}

.active-filter-summary.compact {
    margin: 0;
    padding: 10px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.45);
}

.active-filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.28);
    color: #E9D5FF;
    font-size: 0.76rem;
    font-weight: 700;
}

.active-filter-pill.muted {
    background: rgba(71, 85, 105, 0.18);
    border-color: rgba(148, 163, 184, 0.18);
    color: #CBD5E1;
}


.filter-group-wrapper {
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.filter-group-header {
    border: none;
    border-radius: 0;
    background: rgba(30, 41, 59, 0.32);
}

.filter-group-header + .filter-chips,
.advanced-filters-content .filter-group-wrapper > .filter-chips {
    margin-top: 0;
    padding: 10px 12px 12px 34px;
}

.advanced-filters-content .filter-actions {
    display: none;
}

@media (max-width: 900px) {
    .advanced-filter-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .advanced-filter-toolbar .toolbar-actions {
        justify-content: flex-start;
    }
}

/* v30 meeting note drawer viewport fix
   The meeting note drawer can be opened from inside a MudDialog. Some MudDialog
   ancestors create a transformed containing block, so a fixed drawer with a
   hard 100vh height starts inside the dialog and runs past the bottom of the
   screen. Keep the panel pinned with top + bottom instead of a fixed height,
   then scroll only the drawer body so the footer is always reachable. */
.task-meeting-note-drawer.task-drawer-panel {
    top: 8px;
    right: 8px;
    bottom: 8px;
    margin: 0;
    height: auto;
    max-height: calc(100dvh - 16px);
    display: flex;
    flex-direction: column;
    z-index: 2400;
}

.task-meeting-note-drawer .drawer-content {
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.task-meeting-note-drawer .drawer-header {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

.task-meeting-note-drawer .drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.task-meeting-note-drawer .drawer-footer {
    position: static;
    flex: 0 0 auto;
    bottom: auto;
    margin-top: 14px;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), #0F172A 34%);
}

.light-mode .task-meeting-note-drawer .drawer-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #FFFFFF 34%);
}

@media (max-width: 640px) {
    .task-meeting-note-drawer.task-drawer-panel {
        left: 8px;
        width: auto;
        max-width: none;
    }
}

/* v50 meeting note drawer */
.task-meeting-note-drawer .readonly-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 12px;
    background: rgba(15, 23, 42, .65);
    color: #E5E7EB;
}

.task-meeting-note-drawer .readonly-card span {
    color: #93A4BC;
    font-size: 12px;
}

.task-meeting-note-drawer .form-grid.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.task-meeting-note-drawer .field-block {
    margin-bottom: 12px;
}

.task-meeting-note-drawer .meeting-note-help {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(59, 130, 246, .22);
    border-radius: 12px;
    background: rgba(59, 130, 246, .08);
    color: #BFDBFE;
    font-size: 12px;
}

.task-meeting-note-drawer .meeting-note-help b {
    color: #F8FAFC;
}

@media (max-width: 640px) {
    .task-meeting-note-drawer .form-grid.two {
        grid-template-columns: 1fr;
    }
}

/* Task Details - Meeting Notes tab */
.meeting-notes-panel .meeting-note-row {
    align-items: flex-start;
    padding: 14px 0;
}

.meeting-note-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.meeting-note-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meeting-note-title span {
    color: #93a4bd;
    font-size: .82rem;
    white-space: nowrap;
}

.meeting-note-content p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.45;
    white-space: pre-wrap;
}

.meeting-note-content small {
    color: #8ea3bd;
}

.light-mode .meeting-note-title span,
.light-mode .meeting-note-content small {
    color: var(--mud-palette-text-secondary) !important;
}

.light-mode .meeting-note-content p {
    color: var(--mud-palette-text-primary) !important;
}

/* User-configurable Advanced Filter tags */
.advanced-filters-content .btn-configure-tags {
    background: rgba(14, 165, 233, 0.10);
    border-color: rgba(14, 165, 233, 0.26);
    color: #BAE6FD;
}

.advanced-filters-content .btn-configure-tags:hover {
    background: rgba(14, 165, 233, 0.17);
    border-color: rgba(56, 189, 248, 0.42);
    color: #E0F2FE;
}

.advanced-filter-tags-dialog .mud-dialog-content {
    overflow: hidden;
}

.tag-config-dialog-title h2 {
    margin: 0;
    color: #F8FAFC;
    font-size: 1.1rem;
}

.tag-config-dialog-title p {
    margin: 4px 0 0;
    color: #94A3B8;
    font-size: 0.82rem;
}

.tag-config-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
    gap: 14px;
    max-height: 68vh;
    overflow: auto;
    padding-right: 4px;
}

.tag-config-card {
    padding: 14px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.tag-config-card-primary {
    grid-row: span 2;
    position: sticky;
    top: 0;
    align-self: start;
}

.tag-config-card-wide {
    grid-column: 2;
}

.tag-config-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tag-config-card-head b {
    display: block;
    color: #E5E7EB;
    font-size: 0.92rem;
}

.tag-config-card-head small {
    display: block;
    margin-top: 2px;
    color: #94A3B8;
    font-size: 0.74rem;
}

.tag-config-link {
    border: 1px solid rgba(14, 165, 233, 0.24);
    background: rgba(14, 165, 233, 0.10);
    color: #BAE6FD;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.tag-config-link:hover {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(56, 189, 248, 0.44);
}

.tag-config-selected-list,
.tag-config-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-config-option-list.compact {
    max-height: 210px;
    overflow: auto;
    padding-right: 4px;
}

.tag-config-chip,
.tag-config-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.18);
    color: #E5E7EB;
    font-size: 0.8rem;
}

.tag-config-chip b,
.tag-config-option b {
    font-size: 0.8rem;
}

.tag-config-chip button {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    color: #CBD5E1;
    cursor: pointer;
    line-height: 1;
}

.tag-config-chip button:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #FECACA;
}

.tag-config-option {
    cursor: pointer;
    transition: all 0.16s ease;
}

.tag-config-option:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.42);
}

.tag-config-option small {
    color: #94A3B8;
    font-size: 0.68rem;
}

.tag-config-option.is-selected,
.tag-config-option:disabled {
    cursor: default;
    opacity: 0.62;
}

.tag-config-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 14px;
}

.tag-config-empty {
    width: 100%;
    padding: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    color: #94A3B8;
    font-size: 0.82rem;
    text-align: center;
}

@media (max-width: 900px) {
    .tag-config-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .tag-config-card-primary,
    .tag-config-card-wide {
        grid-column: auto;
        grid-row: auto;
        position: static;
    }

    .tag-config-add-row {
        grid-template-columns: 1fr;
    }
}

.tag-config-chip.customer, .tag-config-option.customer { background: rgba(59, 130, 246, 0.18); border-color: rgba(96, 165, 250, 0.38); }
.tag-config-chip.engineering, .tag-config-option.engineering { background: rgba(14, 165, 233, 0.18); border-color: rgba(56, 189, 248, 0.38); }
.tag-config-chip.production, .tag-config-option.production { background: rgba(34, 197, 94, 0.16); border-color: rgba(74, 222, 128, 0.35); }
.tag-config-chip.purchasing, .tag-config-option.purchasing { background: rgba(245, 158, 11, 0.18); border-color: rgba(251, 191, 36, 0.38); }
.tag-config-chip.it, .tag-config-option.it { background: rgba(99, 102, 241, 0.18); border-color: rgba(129, 140, 248, 0.38); }
.tag-config-chip.bug, .tag-config-option.bug { background: rgba(239, 68, 68, 0.17); border-color: rgba(248, 113, 113, 0.38); }
.tag-config-chip.feature, .tag-config-option.feature { background: rgba(168, 85, 247, 0.18); border-color: rgba(192, 132, 252, 0.38); }
.tag-config-chip.request, .tag-config-option.request { background: rgba(20, 184, 166, 0.16); border-color: rgba(45, 212, 191, 0.34); }
.tag-config-chip.critical, .tag-config-option.critical { background: rgba(220, 38, 38, 0.24); border-color: rgba(248, 113, 113, 0.5); }
.tag-config-chip.waiting, .tag-config-option.waiting { background: rgba(234, 179, 8, 0.16); border-color: rgba(250, 204, 21, 0.35); }
.tag-config-chip.drawing, .tag-config-option.drawing { background: rgba(6, 182, 212, 0.16); border-color: rgba(34, 211, 238, 0.35); }
.tag-config-chip.parts, .tag-config-option.parts { background: rgba(251, 146, 60, 0.18); border-color: rgba(253, 186, 116, 0.38); }
.tag-config-chip.ai, .tag-config-option.ai { background: rgba(217, 70, 239, 0.18); border-color: rgba(232, 121, 249, 0.38); }
.tag-config-chip.followup, .tag-config-option.followup { background: rgba(244, 63, 94, 0.17); border-color: rgba(251, 113, 133, 0.36); }
.tag-config-chip.meeting, .tag-config-option.meeting { background: rgba(124, 58, 237, 0.18); border-color: rgba(167, 139, 250, 0.38); }
.tag-config-chip.quality, .tag-config-option.quality { background: rgba(34, 197, 94, 0.18); border-color: rgba(74, 222, 128, 0.38); }
.tag-config-chip.safety, .tag-config-option.safety { background: rgba(245, 158, 11, 0.20); border-color: rgba(251, 191, 36, 0.42); }
.tag-config-chip.quote, .tag-config-option.quote { background: rgba(14, 165, 233, 0.17); border-color: rgba(56, 189, 248, 0.36); }
.tag-config-chip.approval, .tag-config-option.approval { background: rgba(168, 85, 247, 0.19); border-color: rgba(192, 132, 252, 0.40); }
.tag-config-chip.warranty, .tag-config-option.warranty { background: rgba(100, 116, 139, 0.22); border-color: rgba(148, 163, 184, 0.38); }
.tag-config-chip.custom, .tag-config-option.custom { background: rgba(71, 85, 105, 0.3); border-color: rgba(148, 163, 184, 0.35); }

/* Advanced filter personal tag list clarity */
.filter-helper-note {
    margin: 0 0 10px 0;
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 10px;
    color: var(--muted-text, #93a4bd);
    background: rgba(59, 130, 246, 0.08);
    font-size: 0.84rem;
}

.tag-config-available-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted-text, #93a4bd);
    font-size: 0.84rem;
}

/* v28 Response owner selector: searchable full-user picker */
.response-form-drawer .owner-search-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.response-form-drawer .owner-search-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.response-form-drawer .owner-search-text b,
.response-form-drawer .owner-search-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.response-form-drawer .owner-search-text small {
    margin-top: 3px;
    color: var(--muted-text, #93a4bd);
    font-size: 0.76rem;
}

.response-form-drawer .mini-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    background: rgba(59, 130, 246, 0.82);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

/* v31 Attachment actions */
.task-attachments-dialog .attachment-card-with-actions {
    position: relative;
    overflow: hidden;
}

.task-attachments-dialog .attachment-remove-action {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    opacity: .92;
}

.task-attachments-dialog .attachment-remove-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.task-attachments-dialog .attachment-card-with-actions:hover .attachment-remove-action {
    opacity: 1;
}

.task-attachments-dialog .attachment-card-with-actions:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 34%, var(--mud-palette-divider)) !important;
}


/* v32 Meeting Note drawer field/save fix */
.task-meeting-note-drawer .meeting-note-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.task-meeting-note-drawer .meeting-note-type-field,
.task-meeting-note-drawer .meeting-note-author-field {
    min-width: 0;
}

.task-meeting-note-drawer .meeting-note-type-select,
.task-meeting-note-drawer .meeting-note-type-select .mud-input,
.task-meeting-note-drawer .meeting-note-type-select .mud-select {
    width: 100%;
}

.task-meeting-note-drawer .meeting-note-author-card {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: rgba(15, 23, 42, .45);
    color: #E5E7EB;
    font-weight: 700;
    overflow: hidden;
}

.task-meeting-note-drawer .meeting-note-author-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.light-mode .task-meeting-note-drawer .meeting-note-author-card {
    background: rgba(248, 250, 252, .88);
    border-color: rgba(15, 23, 42, .14);
    color: #0F172A;
}


/* v33 Meeting Note note type native selector fix
   MudSelect popovers can be trapped behind overlay/drawer layers in this drawer.
   A native select keeps selection reliable and still binds directly to NoteType. */
.task-meeting-note-drawer .meeting-note-type-native {
    width: 100%;
    min-height: 40px;
    padding: 8px 38px 8px 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: rgba(15, 23, 42, .45);
    color: #E5E7EB;
    font: inherit;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    appearance: auto;
}

.task-meeting-note-drawer .meeting-note-type-native:focus {
    border-color: rgba(59, 130, 246, .70);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

.task-meeting-note-drawer .meeting-note-type-native option {
    background: #0F172A;
    color: #E5E7EB;
}

.light-mode .task-meeting-note-drawer .meeting-note-type-native {
    background: rgba(248, 250, 252, .88);
    border-color: rgba(15, 23, 42, .14);
    color: #0F172A;
}

.light-mode .task-meeting-note-drawer .meeting-note-type-native option {
    background: #FFFFFF;
    color: #0F172A;
}

/* Unified Task + Response editor */
.task-drawer-panel.unified-task-drawer {
    width: min(1040px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    margin: 8px 12px 8px 8px;
}

.unified-task-form {
    padding: 22px 20px 14px;
}

.unified-task-header {
    align-items: flex-start;
    margin-bottom: 14px !important;
}

.unified-task-header .drawer-helper-text {
    margin: 6px 0 0;
}

.unified-form-section {
    margin: 0 0 10px;
    padding: 14px 16px 16px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 10px;
    background: rgba(15, 23, 42, .34);
}

.unified-section-title {
    margin-bottom: 4px;
    color: #82A8FF;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.unified-form-section .drawer-label {
    margin-top: 10px;
}

.unified-form-section .editor-textarea textarea {
    min-height: 92px !important;
}

.unified-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
}

.unified-progress-slider {
    flex: 1 1 auto;
}

.unified-progress-value {
    min-width: 52px;
    padding: 7px 9px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 7px;
    color: #F8FAFC;
    background: rgba(15, 23, 42, .75);
    font-size: 13px;
    font-weight: 800;
}

.unified-smart-tags {
    margin: 8px 0 0;
}

.unified-tag-suggestions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.unified-notify-box {
    height: 100%;
    margin-top: 8px;
}

.unified-notify-people {
    min-height: 74px;
}

.unified-notify-picker {
    max-height: 280px;
    overflow: auto;
}

.unified-drawer-footer {
    bottom: -14px;
    margin-top: 14px;
    padding: 16px 0 2px;
}

@media (max-width: 900px) {
    .task-drawer-panel.unified-task-drawer {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 8px;
    }

    .unified-tag-suggestions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .unified-task-form {
        padding: 18px 14px 12px;
    }

    .unified-form-section {
        padding: 12px;
    }

    .unified-tag-suggestions {
        grid-template-columns: 1fr;
    }
}
