/*
 * Task details: padding and spacing.
 * No boxed sections. Space is the hierarchy.
 */

.modal-body.task-view-modal-body {
    padding: 24px 28px 20px !important;
}

.task-view-modal-body .container-fluid,
.task-details .container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.task-details__main {
    padding-right: 16px;
}

.task-details__sidebar {
    padding-left: 12px;
}

.td-breadcrumbs {
    font-size: 13px;
    color: #898fa9;
    padding: 0 0 16px;
    margin: 0;
    line-height: 1.5;
}

.td-breadcrumbs a {
    color: #898fa9;
    text-decoration: none;
}

.td-breadcrumbs a:hover {
    color: #2e6da4;
}

.td-breadcrumbs__sep {
    color: #c8c8c8;
    margin: 0 8px;
}

.td-breadcrumbs__current {
    color: #848484;
    font-weight: 500;
}

.td-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 16px;
}

.td-header {
    padding: 0 0 8px;
}

.td-card,
.td-priority .client-priority-request-card,
.td-context .bg-light {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.td-card,
.td-identity {
    padding: 4px 0 16px !important;
}

.td-context .bg-light {
    padding: 12px 0 !important;
}

.td-section {
    background: transparent !important;
    border: none !important;
    border-top: 1px solid #eee !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 28px 0 12px !important;
    margin: 8px 0 0 !important;
}

.td-section--description {
    border-top: none !important;
    padding: 8px 0 20px !important;
    margin: 0 !important;
}

.td-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 0 16px !important;
    margin: 0 0 4px;
}

.td-section__title,
.td-section > strong:first-child,
.td-section--comments > .td-section__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
    margin: 0;
    padding: 0;
    border: none;
}

.td-section--comments > .td-section__title {
    display: block;
    margin-bottom: 16px;
}

.td-meta-list {
    padding: 8px 0 12px;
}

.td-meta {
    display: block;
    padding: 10px 0;
    border: none;
    font-size: 13px;
    line-height: 1.45;
}

.td-meta strong {
    font-weight: 600;
    font-size: 13px;
    color: inherit;
    margin-right: 6px;
}

.td-identity p {
    margin: 8px 0 0;
}

.td-progress {
    padding: 8px 0 16px;
}

.td-timer,
.td-timesheet,
.td-collaborators,
.td-cancel,
.td-priority,
.td-notify,
.td-reminders,
.td-review-actions {
    padding-top: 12px;
    padding-bottom: 12px;
}

.td-cancel-btn {
    padding: 4px 0;
    font-size: 13px;
    color: #dc3545 !important;
}

.td-description a {
    word-break: break-word;
}

.td-description-clip {
    position: relative;
}

.td-description-html {
    display: block;
}

.td-description-source {
    display: none !important;
}

.td-description-clip.is-collapsed {
    max-height: 10.2em;
    overflow: hidden;
}

.td-description-clip.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.6em;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--td-surface, #fff));
    pointer-events: none;
}

.td-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: #3c8dbc;
    font-size: 13px;
    cursor: pointer;
}

.td-more-toggle[hidden] {
    display: none !important;
}

.td-empty {
    margin: 0;
    padding: 8px 0 4px;
    color: #898fa9;
}

.td-section--files .td-file-list {
    list-style: none;
    padding: 4px 0 8px;
    margin: 0;
}

.td-file-list > li {
    padding: 12px 4px !important;
    margin-bottom: 4px;
    gap: 12px;
}

.td-file-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0 4px;
}

.td-file-toolbar .btn {
    margin: 0 !important;
}

.td-create-subtask {
    margin-top: 16px;
    padding-top: 16px;
}

.td-create-subtask .form-group {
    margin-bottom: 0;
}

.task-details .form-control,
.task-details .form-select {
    padding: 10px 14px;
    min-height: 42px;
}

.task-details .input-group {
    gap: 8px;
}

.task-details .input-group > .form-control,
.task-details .input-group > .btn,
.task-details .input-group > .input-group-append > .btn {
    border-radius: 6px !important;
}

.task-details .comment-form-container {
    align-items: flex-start;
    padding-top: 8px;
    gap: 12px;
}

.task-details .comment-form-container textarea.form-control {
    min-height: 96px;
    padding: 12px 14px;
}

.task-details .comment-form-container .card-footer,
.task-details .comment-form-container footer {
    padding: 12px 0 0;
}

.task-details--client .td-section--subtasks.is-empty,
.task-details--client .td-section--ai.is-empty {
    display: none;
}

.task-details__main .col-md-12.mb-4 {
    padding: 20px 0 8px !important;
}

.task-details__main .col-md-12.mb-4 > .border-top {
    border-radius: 0 !important;
    padding: 24px 0 8px !important;
}

.task-details .sub-tasks-container {
    margin-top: 8px;
    padding: 4px 0 8px;
}

.task-details--client .sub-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.task-details--client .sub-tasks-list > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
}

.task-details--client .sub-task-card {
    box-shadow: none;
}

.task-details--client .sub-task-card .card-body {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0 !important;
    max-height: none;
    padding: 10px 12px !important;
}

.task-details--client .sub-task-card .card-status-bottom {
    position: static;
    margin-left: auto;
}

.task-details--client .sub-task-title {
    margin-bottom: 0;
    -webkit-line-clamp: 1;
}

.td-linked-note {
    color: #c49212;
    font-size: 12px;
    font-weight: 600;
}

.td-linked-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.td-linked-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
}

.td-linked-row.is-open-blocker {
    padding: 9px 12px;
    border: 1px solid #e6c36a;
    border-radius: 8px;
    background: #fff8e6;
}

.td-linked-row__kind {
    color: #8b93a7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.td-linked-row.is-open-blocker .td-linked-row__kind {
    color: #c49212;
}

.td-linked-row__name {
    min-width: 0;
}

.td-linked-row__title {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-linked-row__title:hover {
    color: #356df3;
}

.td-linked-row__status {
    flex: 0 0 auto;
    padding: 3px 9px;
    border: 1px solid;
    border-radius: 999px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.td-linked-list #blocked-by-area,
.td-linked-list #blocking-area,
.td-linked-list .task-sub-tasks-section,
.td-linked-list #blocked-by-tasks,
.td-linked-list #blocking-tasks,
.td-linked-list [id^="sub-tasks-"] {
    display: contents;
}

.td-linked-row__delete {
    display: inline-flex;
    align-items: center;
    color: #8b93a7;
}

.td-linked-row__delete:hover {
    color: #dc3545;
}

.td-section--linked .td-create-subtask {
    margin-top: 12px;
}

.task-details .sub-task-card .card-body {
    padding: 16px 16px 28px !important;
    min-height: 110px;
    max-height: none;
}

.task-details .external-urls-section ul {
    padding: 8px 0 12px 18px;
}

.task-details .external-urls-section li {
    padding: 6px 0;
}

.task-details .dependency-section {
    padding: 14px 16px !important;
    margin-top: 8px;
}

/* 3D viewer: keep content off the panel edges */
.task-details__sidebar .viewer-publish-panel {
    margin-top: 16px;
}

.task-details__sidebar .viewer-publish-panel .va-panel__head {
    padding: 16px 18px !important;
}

.task-details__sidebar .viewer-publish-panel .va-panel__body {
    padding: 18px !important;
}

.task-details__sidebar .viewer-publish-field {
    margin-bottom: 16px;
}

.task-details__sidebar .viewer-publish-field .form-control,
.task-details__sidebar .viewer-publish-copy textarea.form-control {
    padding: 10px 12px;
}

.task-details__sidebar .viewer-publish-actions {
    margin-top: 12px;
    gap: 10px;
}

.modal-footer.task-details-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 28px !important;
}

.task-details-footer__danger .delete {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
}

.task-details-footer__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

body.dark-mode .td-breadcrumbs,
body.dark-mode .td-breadcrumbs a,
body.color-1E202D .td-breadcrumbs,
body.color-1E202D .td-breadcrumbs a {
    color: #d4dae8;
}

@media (max-width: 991.98px) {
    .modal-body.task-view-modal-body {
        padding: 20px 16px !important;
    }

    .task-details__main,
    .task-details__sidebar {
        padding-left: 0;
        padding-right: 0;
    }

    .task-details__sidebar {
        margin-top: 24px;
    }
}

@media (max-width: 575.98px) {
    .task-details-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .task-details-footer__actions {
        width: 100%;
    }
}

/* Product-rail task modal */
.task-details-modal .modal-dialog {
    width: calc(100vw - 40px);
    max-width: 1380px !important;
    margin: 20px auto;
}

.task-details-modal .modal-content {
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(24, 32, 56, 0.22);
}

.task-details-modal .modal-header {
    min-height: 54px;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecf2;
}

.task-details-modal .modal-body.task-view-modal-body {
    overflow-y: auto;
    padding: 0 !important;
}

.task-details {
    --td-ink: #19213d;
    --td-muted: #77809a;
    --td-border: #e6e9f0;
    --td-surface: #fff;
    --td-subtle: #f7f8fb;
    --td-primary: #356df3;
    --td-success: #18a875;
    color: var(--td-ink);
    background: var(--td-surface);
}

.td-hero {
    padding: 22px 28px 24px;
    border-bottom: 1px solid var(--td-border);
    background: var(--td-surface);
}

.td-hero__topline,
.td-hero__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.td-hero__topline {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 28px 14px;
    background: var(--td-surface);
    border-bottom: 1px solid var(--td-border);
}

.td-hero__context {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
}

.td-task-number {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid var(--td-border);
    border-radius: 6px;
    color: #606a84;
    background: var(--td-subtle);
    font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.td-hero .td-breadcrumbs,
.td-hero__topline .td-breadcrumbs {
    overflow: hidden;
    padding: 0;
    color: var(--td-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-current-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid color-mix(in srgb, var(--task-status-color) 30%, white);
    border-radius: 999px;
    color: color-mix(in srgb, var(--task-status-color) 76%, #17203b);
    background: color-mix(in srgb, var(--task-status-color) 10%, white);
    font-size: 12px;
    font-weight: 600;
}

.td-current-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--task-status-color);
}

.td-current-status a,
.td-current-status a.white-link,
.td-current-status a.white-link:hover {
    color: inherit !important;
    text-decoration: none;
}

.td-current-status.is-editable,
.td-current-status.is-editable a {
    cursor: pointer;
}

.td-hero__title-row {
    align-items: flex-start;
    margin-top: 15px;
}

.td-hero__title {
    margin: 0;
    color: var(--td-ink);
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.td-hero__labels {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.td-workflow {
    display: flex;
    overflow-x: auto;
    width: 100%;
    margin: 23px 0 0;
    padding: 0 2px 3px;
    list-style: none;
    scrollbar-width: thin;
}

.td-workflow__step {
    position: relative;
    flex: 1 0 112px;
    min-width: 0;
    padding-top: 11px;
}

.td-workflow__track {
    position: absolute;
    top: 4px;
    right: 6px;
    left: 6px;
    height: 4px;
    border-radius: 999px;
    background: #e5e8ef;
}

.td-workflow__marker {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border: 2px solid #dfe3eb;
    border-radius: 50%;
    color: #fff;
    background: #fff;
}

.td-workflow__label {
    display: block;
    overflow: hidden;
    padding: 7px 8px 0;
    color: #9299ab;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-workflow__step.is-complete .td-workflow__track,
.td-workflow__step.is-complete .td-workflow__marker {
    border-color: var(--td-success);
    background: var(--td-success);
}

.td-workflow__step.is-complete .td-workflow__marker {
    width: 14px;
    height: 14px;
    top: -1px;
}

.td-workflow__step.is-complete .td-workflow__label {
    color: #4f5b72;
}

.td-workflow__step.is-past .td-workflow__track,
.td-workflow__step.is-past .td-workflow__marker {
    border-color: #aeb6c8;
    background: #aeb6c8;
}

.td-workflow__step.is-current .td-workflow__track {
    background: var(--task-status-color, var(--td-primary));
}

.td-workflow__step.is-current .td-workflow__marker {
    border-color: var(--task-status-color, var(--td-primary));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--task-status-color, var(--td-primary)) 14%, transparent);
}

.td-workflow__step.is-current .td-workflow__label {
    color: var(--td-ink);
    font-weight: 700;
}

.task-details__grid {
    --bs-gutter-x: 0;
    margin: 0 !important;
    background: var(--td-surface);
}

.task-details__main,
.task-details__sidebar {
    padding: 26px 28px 34px !important;
}

.task-details__main {
    order: 1;
}

.task-details__sidebar {
    order: 0 !important;
    border-right: 1px solid var(--td-border);
    background: #fbfbfd;
}

.task-details--staff .task-details__sidebar {
    flex: 0 0 27%;
    max-width: 27%;
}

.task-details--staff .task-details__main {
    flex: 0 0 73%;
    max-width: 73%;
}

.task-details--client .task-details__grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.task-details--client .task-details__sidebar {
    order: 0 !important;
    flex: 0 0 248px !important;
    width: 248px !important;
    max-width: 248px !important;
    border-right: 1px solid var(--td-border);
    border-left: 0;
}

.task-details--client .task-details__main {
    order: 1;
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
}

.task-details__sidebar > .clearfix > .container-fluid > .row {
    display: block;
}

.task-details__sidebar .td-card,
.task-details__sidebar .td-context,
.task-details__sidebar .td-pinned,
.task-details__sidebar #notify-client-container {
    width: 100%;
}

.task-details__sidebar .td-identity {
    align-items: center;
    padding: 0 0 18px !important;
    border-bottom: 1px solid var(--td-border) !important;
}

.task-details__sidebar .td-meta-list {
    padding: 12px 0 !important;
}

.task-details__sidebar .td-meta {
    display: grid;
    grid-template-columns: minmax(92px, .8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 12px;
    padding: 9px 0;
}

.task-details__sidebar .td-meta strong {
    color: var(--td-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.task-details__sidebar .td-meta > span {
    min-width: 0;
    color: var(--td-ink);
    text-align: right;
    overflow-wrap: anywhere;
}

.task-details__sidebar .td-progress {
    padding: 18px 0 8px !important;
}

.task-details__sidebar .td-context .bg-light,
.task-details__sidebar .client-priority-request-card,
.task-details__sidebar .td-reminders {
    margin-top: 12px;
    padding: 16px !important;
    border: 1px solid var(--td-border) !important;
    border-radius: 9px !important;
    background: var(--td-surface) !important;
}

.td-review-actions {
    margin: 14px 0 4px;
    padding: 19px !important;
    border: 1px solid #cfe8df !important;
    border-radius: 10px !important;
    background: #f3fbf8 !important;
}

.td-review-actions__eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #12815d;
    font-size: 12px;
    font-weight: 700;
}

.td-review-actions__title {
    display: block;
    margin-bottom: 7px;
    font-size: 16px;
}

.td-review-actions__copy {
    margin: 0 0 15px;
    color: #657187;
    font-size: 12px;
    line-height: 1.55;
}

.td-review-actions .btn {
    min-height: 40px;
    margin: 0 0 8px;
}

.td-review-actions .btn-success {
    border-color: var(--td-success);
    background: var(--td-success);
}

.td-review-actions .td-external-review-btn {
    min-height: auto;
    margin: 4px 0 0;
    padding-bottom: 0;
    color: #69748a;
    font-size: 12px;
}

.task-details__main .td-header {
    display: none;
}

.task-details__main .td-section {
    padding: 26px 0 14px !important;
    margin: 0 !important;
    border-top: 1px solid var(--td-border) !important;
}

.task-details__main .td-section:first-of-type,
.task-details__main .td-section--description {
    padding-top: 0 !important;
    border-top: 0 !important;
}

.task-details__main .td-section--description {
    color: #4e5870;
    font-size: 14px;
    line-height: 1.7;
}

.td-section__head {
    margin-bottom: 14px;
    padding: 0 !important;
}

.td-section__title,
.td-section > strong:first-child,
.td-section--comments > .td-section__title {
    color: var(--td-ink);
    font-size: 15px;
    font-weight: 700;
}

.td-section--comments > .td-section__title {
    margin-bottom: 14px;
}

.td-section--files .td-file-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
}

.td-file-list > .td-deliverable {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 13px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--td-border);
    border-radius: 9px;
    background: var(--td-surface);
    overflow: visible;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.td-file-list > .td-deliverable:hover,
.td-file-list > .td-deliverable:has(.dropdown.show) {
    border-color: #cfd5e2;
    box-shadow: 0 8px 22px rgba(40, 50, 78, .08);
}

.td-file-list > .td-deliverable:has(.dropdown.show) {
    z-index: 6;
}

.td-deliverable__preview {
    grid-row: 1 / span 2;
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border: 1px solid #e5e8ef;
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(245, 247, 251, .9)),
        repeating-linear-gradient(135deg, #f0f2f7 0, #f0f2f7 8px, #f8f9fb 8px, #f8f9fb 16px);
}

.td-deliverable__preview:not(.td-deliverable__preview--static):hover::after {
    content: "Open";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(24, 33, 59, .72);
    font-size: 11px;
    font-weight: 700;
}

.td-deliverable__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-deliverable__thumbnail--contain {
    padding: 13px;
    object-fit: contain;
}

.td-deliverable__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #7b849b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
}

.td-deliverable__body {
    min-width: 0;
    align-self: end;
}

.td-deliverable__heading {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.td-file-type,
.td-file-version {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 4px;
    color: #3e68cb;
    background: #edf3ff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.td-deliverable.is-image .td-file-type {
    color: #8a5a13;
    background: #fff5df;
}

.td-deliverable.is-archive .td-file-type {
    color: #6b52a2;
    background: #f3edff;
}

.td-file-version {
    color: #6e768b;
    background: #f0f1f5;
}

.td-deliverable__name {
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: var(--td-ink);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.td-deliverable__name:hover {
    color: var(--td-primary);
}

.td-deliverable__meta {
    display: flex;
    gap: 5px;
    margin-top: 4px;
    color: var(--td-muted);
    font-size: 10px;
}

.td-deliverable__actions {
    display: flex;
    align-items: center;
    align-self: start;
    gap: 5px;
    min-width: 0;
    margin-top: 10px;
}

.td-deliverable__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    margin: 0 !important;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 10px;
}

.td-deliverable__actions .btn-primary {
    border-color: var(--td-primary);
    background: var(--td-primary);
}

.td-deliverable__actions .dropdown {
    position: relative;
    z-index: 2;
}

.td-deliverable__actions .dropdown-menu {
    position: absolute;
    inset: auto 0 auto auto;
    top: calc(100% + 4px);
    z-index: 30;
}

.td-file-toolbar {
    padding-top: 14px;
}

.task-details .comment-form-container {
    padding: 0;
}

.task-details .comment-form-container textarea.form-control {
    min-height: 84px;
    border-color: var(--td-border);
    border-radius: 8px;
    background: var(--td-subtle);
}

.task-details .comment-form-container textarea.form-control:focus {
    border-color: #9bb5fa;
    background: var(--td-surface);
    box-shadow: 0 0 0 3px rgba(53, 109, 243, .1);
}

.task-details .sub-task-card {
    box-shadow: none;
}

.task-details .td-activity {
    padding: 0 28px 16px;
    border-top: 1px solid var(--td-border);
}

.task-details .td-activity .box-title,
.td-activity__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 16px 0 8px;
    border: 0;
    background: none;
    color: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.td-activity__toggle .feather {
    color: #8b93a7;
    transition: transform .16s ease;
}

.td-activity.is-collapsed .td-activity__toggle .feather {
    transform: rotate(-90deg);
}

.td-activity.is-collapsed .td-activity__body {
    display: none;
}

.modal-footer.task-details-footer {
    min-height: 62px;
    padding: 11px 20px !important;
    border-top: 1px solid #e9ecf2;
    background: #fbfbfd;
}

.task-details-footer__actions .btn {
    margin: 0 !important;
    border-radius: 6px;
}

body.dark-mode .task-details,
body.color-1E202D .task-details {
    --td-ink: #f4f6fb;
    --td-muted: #c9d1e6;
    --td-border: #4a5164;
    --td-surface: #232833;
    --td-subtle: #2d3342;
}

@media (max-width: 1100px) {
    .task-details--staff .task-details__sidebar {
        flex-basis: 34%;
        max-width: 34%;
    }

    .task-details--staff .task-details__main {
        flex-basis: 66%;
        max-width: 66%;
    }

    .td-section--files .td-file-list {
        grid-template-columns: 1fr;
    }

    .task-details--client .td-section--files .td-file-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .task-details-modal .modal-dialog {
        width: 100%;
        max-width: none !important;
        height: 100%;
        margin: 0;
    }

    .task-details-modal .modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .td-hero {
        padding: 18px 16px 20px;
    }

    .td-hero__topline {
        padding: 14px 16px 12px;
    }

    .td-hero__topline,
    .td-hero__title-row,
    .td-hero__context {
        align-items: flex-start;
    }

    .td-hero__topline,
    .td-hero__title-row {
        flex-wrap: wrap;
    }

    .td-hero__context {
        width: 100%;
    }

    .td-hero .td-breadcrumbs {
        white-space: normal;
    }

    .td-hero__labels {
        justify-content: flex-start;
    }

    .task-details--staff .task-details__sidebar,
    .task-details--staff .task-details__main,
    .task-details--client .task-details__sidebar,
    .task-details--client .task-details__main {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .task-details__main,
    .task-details__sidebar {
        padding: 22px 16px 28px !important;
    }

    .task-details--client .task-details__main,
    .task-details--staff .task-details__main {
        order: 0;
    }

    .task-details--client .task-details__sidebar,
    .task-details--staff .task-details__sidebar {
        order: 1 !important;
        border: 0;
        border-top: 1px solid var(--td-border);
    }
}

@media (max-width: 420px) {
    .td-file-list > .td-deliverable {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 0 10px !important;
        padding: 10px !important;
    }

    .td-deliverable__preview {
        width: 58px;
        height: 64px;
    }

    .td-action-label {
        display: none;
    }
}

/* Client review cut */
.task-details-modal--client .modal-header {
    display: none;
}

.task-details-modal--client .modal-content {
    max-width: 1200px;
    margin: 0 auto;
}

.td-hero__controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 13px;
}

.td-hero__close,
.td-hero__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #7f8799;
    background: transparent;
}

.td-hero__close:hover,
.td-hero__share:hover {
    color: var(--td-ink);
    background: var(--td-subtle);
}

.td-hero__share.is-copied {
    color: #2e7d4f;
    background: rgba(46, 125, 79, .1);
}

.task-details--client .td-hero__labels {
    display: none;
}

.task-details--client-reviewing .td-workflow__step.is-current .td-workflow__track {
    background: #f0a500;
}

.task-details--client-reviewing .td-workflow__step.is-current .td-workflow__marker {
    border-color: #f0a500;
    box-shadow: 0 0 0 4px rgba(240, 165, 0, .14);
}

.task-details--client-reviewing .td-workflow__step.is-current .td-workflow__label {
    color: #cf8500;
}

.task-details--client .task-details__sidebar {
    flex: 0 0 248px !important;
    width: 248px !important;
    max-width: 248px !important;
    padding: 20px 18px 28px !important;
}

.task-details--client .task-details__main {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding: 16px 28px 32px !important;
}

.task-details--client .task-details__main > .clearfix > .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.task-details--client .task-details__sidebar > .clearfix > .container-fluid > .row {
    display: flex;
    flex-direction: column;
}

.task-details--client .td-overview {
    order: 0;
}

.task-details--client .task-details__sidebar .td-identity {
    display: none !important;
}

.task-details--client .task-details__sidebar .td-meta-list {
    order: 1;
    margin-top: 8px;
}

.task-details--client .task-details__sidebar .client-priority-request-card {
    overflow: visible !important;
}

.task-details--client .client-priority-request-form {
    grid-template-columns: 1fr;
}

.task-details--client .client-priority-request-form .form-label {
    white-space: normal;
    overflow-wrap: anywhere;
}

.task-details--client .client-priority-actions {
    min-width: 0;
}

.task-details--client .task-details__sidebar .td-cancel {
    order: 3;
}

.task-details--client .task-details__sidebar .td-context {
    display: none !important;
}

.task-details--client > .td-client-feedback {
    display: none;
}

.task-details--client .task-details__main .td-client-feedback {
    display: block;
}

@media (min-width: 1101px) {
    .task-details--client .td-section--files .td-file-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }
}

.task-details--client .td-section--files .td-file-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.task-details--focus-deliverables .task-details__main .td-section--files {
    margin-top: 0 !important;
    padding-top: 10px !important;
    border-top: 0 !important;
}

.task-details--client .td-file-list > .td-deliverable {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    padding: 0 0 10px !important;
    overflow: visible;
}

.task-details--client .td-deliverable__preview {
    grid-row: auto;
    width: 100%;
    height: 92px;
    border-width: 0 0 1px;
    border-radius: 8px 8px 0 0;
}

.task-details--client .td-deliverable__thumbnail--contain {
    padding: 10px;
}

.task-details--client .td-deliverable__body,
.task-details--client .td-deliverable__actions {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

.task-details--client .td-deliverable__body {
    margin-top: 8px;
}

.task-details--client .td-deliverable__name {
    font-size: 12px;
}

.task-details--client .td-deliverable__actions {
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    margin-top: 8px;
}

.task-details--client .td-deliverable__actions .dropdown {
    width: 100%;
}

.task-details--client .td-deliverable__actions .btn {
    width: 100%;
    min-height: 28px;
    padding: 4px 8px;
}

.task-details--client .task-details__main .td-client-feedback.td-section {
    margin-top: 8px !important;
    padding: 20px 0 8px !important;
    border-top: 1px solid var(--td-border) !important;
    background: transparent;
}

.task-details--client .td-client-feedback .td-section__head {
    padding: 0 0 4px !important;
    margin: 0;
}

.task-details--client .td-client-feedback .td-section__title {
    margin: 0;
}

.td-client-feedback__hint {
    margin: 0 0 14px;
    color: var(--td-muted);
    font-size: 12px;
    line-height: 1.45;
}

.td-client-feedback__body,
.td-client-feedback .list-container {
    max-width: 560px;
}

.td-client-feedback .comment-form-container {
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 4px;
    padding: 0 !important;
    border: 0 !important;
}

.td-client-feedback .comment-form-container .avatar {
    width: 32px;
    height: 32px;
    margin: 2px 0 0;
}

.td-client-feedback .comment-form-container .pr15 {
    padding-right: 0 !important;
}

.td-client-feedback .post-dropzone {
    display: block;
    margin: 0 !important;
    padding: 0;
    border: 0;
    background: transparent;
}

.td-client-feedback textarea.form-control,
.td-client-feedback .comment_description {
    display: block;
    width: 100%;
    min-height: 72px !important;
    max-height: 140px;
    margin: 0;
    padding: 10px 12px !important;
    border: 1px solid var(--td-border) !important;
    border-radius: 8px !important;
    background: var(--td-subtle) !important;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
}

.td-client-feedback textarea.form-control:focus {
    border-color: #9bb5fa !important;
    background: var(--td-surface) !important;
    box-shadow: 0 0 0 3px rgba(53, 109, 243, .1);
}

.td-feedback-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.td-client-feedback .post-dropzone > .me-auto,
.td-feedback-toolbar > .me-auto {
    display: flex;
    align-items: center;
    margin: 0 !important;
}

.td-client-feedback .upload-file-button {
    min-height: auto;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #356df3;
    background: transparent !important;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none !important;
}

.td-client-feedback .upload-file-button:hover {
    color: #1f4fd6;
    background: transparent !important;
    text-decoration: underline;
}

.td-client-feedback .td-feedback-actions,
.td-client-feedback .post-dropzone > footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.td-client-feedback .td-feedback-actions .btn,
.td-client-feedback .post-dropzone > footer .btn {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.td-client-feedback .card,
.td-client-feedback .card-header,
.td-client-feedback .card-body {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.td-client-feedback .filter-version {
    margin: 0 0 8px;
}

.td-client-feedback .filter-version .input-group {
    max-width: 220px;
}

.td-client-feedback .client-comment {
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--td-border) !important;
}

.td-client-feedback .client-comment:last-child {
    border-bottom: 0 !important;
}

.td-client-feedback .client-comment .avatar {
    width: 32px;
    height: 32px;
}

.td-client-feedback .client-comment .ms-3 {
    margin-left: 10px !important;
}

.td-client-feedback .client-comment .justify-content-between {
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 4px !important;
}

.td-client-feedback .client-comment .fw-bold {
    font-size: 13px;
    font-weight: 650;
}

.td-client-feedback .client-comment .small {
    color: var(--td-muted);
    font-size: 11px;
}

.td-client-feedback .comment-content p {
    margin: 0 0 4px;
    color: var(--td-ink);
    font-size: 13px;
    line-height: 1.45;
}

.td-client-feedback .client-comment .badge {
    padding: 3px 7px;
    border-radius: 4px;
    background: #edf3ff !important;
    color: #3e68cb !important;
    font-size: 10px;
    font-weight: 700;
}

.td-client-feedback .client-comment .btn-link {
    padding: 0;
    font-size: 12px;
    font-weight: 600;
}

.td-client-feedback .text-center.p-4 {
    padding: 16px 0 !important;
    color: var(--td-muted);
}

.task-details-modal--client .task-details-footer__hint {
    color: #7b8498;
    font-size: 12px;
}

.task-details-modal--client .task-details-footer__actions > a {
    display: none !important;
}

.task-details-modal--client .task-details-footer__actions button svg {
    display: none;
}

.task-details-modal:not(.task-details-modal--client) .task-details-footer__actions [data-bs-dismiss="modal"] {
    display: none;
}

@media (max-width: 767.98px) {
    .task-details--client .task-details__grid {
        flex-wrap: wrap;
    }

    .task-details--client .task-details__main,
    .task-details--client .task-details__sidebar {
        flex-basis: 100%;
        max-width: 100%;
    }

    .task-details--client .task-details__sidebar {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .task-details--client .task-details__main {
        order: 0;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .td-client-feedback {
        padding: 18px 0 8px !important;
    }

    .task-details--client .td-client-deliverables {
        padding: 22px 16px 26px !important;
    }

    .task-details--client .td-section--files .td-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-details-modal--client .task-details-footer__hint {
        display: none;
    }
}

@media (max-width: 420px) {
    .task-details--client .td-section--files .td-file-list {
        grid-template-columns: 1fr;
    }
}

/* Team production cut */
.task-details-modal .modal-header {
    display: none;
}

.task-details,
.task-details button,
.task-details input,
.task-details select,
.task-details textarea,
.task-details-footer {
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.task-details {
    font-size: 14px;
    line-height: 1.5;
}

.task-details--staff .td-hero {
    padding: 16px 20px 0;
}

.task-details--staff .td-hero__topline {
    padding: 16px 20px 14px;
}

.task-details--staff .td-hero__title-row,
.task-details--staff > .td-hero > .td-workflow {
    display: none;
}

.td-hero__time {
    color: var(--td-ink);
    font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.td-timesheet-toggle {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.td-hero__time.td-timesheet-toggle {
    width: auto;
    justify-content: flex-end;
}

.td-timesheet-toggle.is-open,
.td-hero__time.td-timesheet-toggle.is-open {
    color: #356df3;
}

.td-timesheet-panel:not([hidden]) {
    margin: 0 0 12px;
}

.td-staff-meta-strip {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr 1fr 1.1fr;
    margin: 0 -20px;
    border-top: 1px solid var(--td-border);
}

.td-staff-meta-strip__item {
    min-width: 0;
    padding: 11px 16px 12px;
    border-right: 1px solid var(--td-border);
}

.td-staff-meta-strip__item:last-child {
    border-right: 0;
}

.td-staff-meta-strip__label,
.td-staff-meta-strip__value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-staff-meta-strip__label {
    margin-bottom: 6px;
    color: var(--td-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.td-staff-meta-strip__value {
    color: var(--td-ink);
    font-size: 13px;
}

.td-staff-meta-strip__person {
    display: flex;
    align-items: center;
    gap: 7px;
}

.td-staff-meta-strip__person .avatar {
    flex: 0 0 auto;
}

.task-details--staff .task-details__sidebar {
    flex-basis: 21.5%;
    max-width: 21.5%;
    margin-top: 0;
    padding: 20px 18px 28px !important;
}

.task-details--staff .task-details__main {
    flex-basis: 78.5%;
    max-width: 78.5%;
    padding: 22px 26px 32px !important;
}

.task-details--staff .task-details__main .td-header {
    display: block;
    padding: 0 0 8px;
}

.task-details--staff .task-details__main .td-title {
    margin: 0;
    color: var(--td-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.td-title-points {
    display: inline-flex;
    margin-left: 7px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #7c8497;
    background: var(--td-subtle);
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}

.td-title-points a {
    color: inherit;
    text-decoration: none;
}

.task-details--staff .task-details__sidebar .td-identity,
.task-details--staff .task-details__sidebar .td-meta-list {
    display: none;
}

.td-staff-workflow {
    width: 100%;
    margin: 0 0 17px;
    padding: 0 0 13px;
    border-bottom: 1px solid var(--td-border);
}

.td-staff-workflow__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.td-staff-workflow__step {
    position: relative;
    display: flex;
    min-height: 38px;
    gap: 10px;
    padding: 0 0 8px;
    cursor: pointer;
}

.td-staff-workflow__step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: -1px;
    left: 5px;
    width: 2px;
    background: #e1e5ec;
}

.td-staff-workflow__marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin-top: 2px;
    border: 2px solid #dfe3eb;
    border-radius: 50%;
    color: #fff;
    background: #fbfbfd;
}

.td-staff-workflow__content {
    min-width: 0;
    padding-top: 0;
}

.td-staff-workflow__content strong,
.td-staff-workflow__content small {
    display: block;
}

.td-staff-workflow__content strong {
    overflow: hidden;
    color: #7a8397;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-staff-workflow__content small {
    margin-top: 3px;
    color: #a0a7b6;
    font: 500 10px/1.2 "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.td-staff-workflow__step.is-complete .td-staff-workflow__marker,
.td-staff-workflow__step.is-complete:not(:last-child)::before {
    border-color: var(--td-success);
    background: var(--td-success);
}

.td-staff-workflow__step.is-complete .td-staff-workflow__content strong {
    color: #3e4a61;
}

.td-staff-workflow__step.is-past .td-staff-workflow__marker,
.td-staff-workflow__step.is-past:not(:last-child)::before {
    border-color: #aab2c3;
    background: #aab2c3;
}

.td-staff-workflow__step.is-current .td-staff-workflow__marker {
    width: 14px;
    height: 14px;
    margin-top: 1px;
    margin-left: -1px;
    border: 3px solid #f0a500;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(240, 165, 0, .12);
}

.td-staff-workflow__step.is-current .td-staff-workflow__content strong {
    color: var(--td-ink);
    font-weight: 700;
}

.td-staff-workflow__step.is-current .td-staff-workflow__content small {
    color: #cf8500;
    font-family: inherit;
    font-weight: 700;
}

.task-details--staff .td-timer {
    margin: 0 0 12px;
    padding: 12px !important;
    border: 1px solid var(--td-border) !important;
    border-radius: 8px !important;
    background: var(--td-surface) !important;
}

.task-details--staff .td-timesheet {
    margin-bottom: 12px;
    padding: 9px 0 !important;
}

.task-details--staff .td-context .bg-light {
    font-size: 12px;
    line-height: 1.55;
}

.task-details--staff .td-section--files .td-file-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.task-details--staff .td-file-list > .td-deliverable {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    padding: 0 0 11px !important;
    overflow: visible;
}

.task-details--staff .td-deliverable__preview {
    width: 100%;
    height: 108px;
    border-width: 0 0 1px;
    border-radius: 9px 9px 0 0;
}

.task-details--staff .td-deliverable__body,
.task-details--staff .td-deliverable__actions {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

.task-details--staff .td-deliverable__body {
    margin-top: 10px;
}

.task-details--staff .td-deliverable__actions {
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    margin-top: 9px;
}

.task-details--staff .td-deliverable__actions .dropdown {
    width: 100%;
}

.task-details--staff .td-deliverable__actions .btn {
    width: 100%;
}

.task-details--staff .td-activity {
    margin-left: 21.5%;
    padding-right: 26px;
    padding-left: 26px;
    border-left: 1px solid var(--td-border);
}

.task-details-footer__danger {
    display: flex;
    align-items: center;
    gap: 13px;
}

.task-details-footer__cancel {
    padding: 0 !important;
    color: #77809a !important;
    font-size: 12px;
    text-decoration: none;
}

.td-send-review-btn:not(:disabled) {
    border-color: #356df3 !important;
    color: #fff !important;
    background: #356df3 !important;
    opacity: 1 !important;
}

.td-send-review-btn:not(:disabled):hover,
.td-send-review-btn:not(:disabled):focus,
.td-send-review-btn:not(:disabled):active {
    border-color: #2459d8 !important;
    color: #fff !important;
    background: #2459d8 !important;
}

.td-send-review-btn:disabled {
    border-color: #dfe3eb !important;
    color: #8c94a6 !important;
    background: #f2f3f6 !important;
    opacity: 1;
    cursor: not-allowed;
}

@media (max-width: 1100px) {
    .task-details--staff .task-details__sidebar {
        flex-basis: 26%;
        max-width: 26%;
    }

    .task-details--staff .task-details__main {
        flex-basis: 74%;
        max-width: 74%;
    }

    .task-details--staff .td-activity {
        margin-left: 26%;
    }

    .task-details--staff .td-section--files .td-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .td-staff-meta-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .td-staff-meta-strip__item {
        border-bottom: 1px solid var(--td-border);
    }

    .task-details--staff .task-details__sidebar,
    .task-details--staff .task-details__main {
        flex-basis: 100%;
        max-width: 100%;
    }

    .task-details--staff .task-details__main {
        order: 0;
    }

    .task-details--staff .task-details__sidebar {
        order: 1 !important;
    }

    .task-details--staff .td-activity {
        margin-left: 0;
        border-left: 0;
    }
}

@media (max-width: 520px) {
    .task-details--staff .td-section--files .td-file-list {
        grid-template-columns: 1fr;
    }
}

/* Client action zone + overview (status-driven layout) */
.td-action-zone {
    padding: 16px 28px;
    border-bottom: 1px solid var(--td-border);
    background: #f4f6fa;
}

.td-action-zone__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
}

.td-action-zone__copy {
    margin: 0;
    color: #3d4660;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.td-action-zone__file {
    margin: 4px 0 0;
    color: #7b8498;
    font-size: 12px;
    font-weight: 500;
}

.td-action-zone__asset {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.td-action-zone__thumb {
    display: flex;
    flex: 0 0 56px;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--td-border);
    border-radius: 8px;
    background: #fff;
}

.td-action-zone__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.td-action-zone__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.td-action-zone__btn {
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.td-action-zone__btn--ghost {
    border: 1px solid #d5dae6;
    color: #31405f;
    background: #fff;
}

.td-action-zone__btn--ghost:hover {
    background: #f7f8fb;
}

.td-action-zone__btn--approve {
    border-color: #12815d;
    color: #fff;
    background: #18a875;
}

.td-action-zone__btn--approve:hover {
    color: #fff;
    background: #12815d;
}

.td-action-zone__actions .td-action-zone__btn {
    text-decoration: none;
}

.td-action-zone--todo,
.td-action-zone--cancelled {
    background: #f4f6fa;
}

.td-action-zone--inprogress,
.td-action-zone--qc {
    background: #f3eefc;
}

.td-action-zone--blocked {
    background: #fff6e5;
}

.td-action-zone--changes {
    background: #fdeeee;
}

.td-action-zone--review,
.td-action-zone--externalreview {
    background: #eef8f3;
}

.td-action-zone--done {
    background: #18a875;
}

.td-action-zone--done .td-action-zone__copy,
.td-action-zone--done .td-action-zone__file {
    color: #fff;
}

.td-viewer-upsell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 28px 0;
    padding: 12px 14px;
    border: 1px solid #d7e4f5;
    border-radius: 10px;
    background: #f3f8ff;
}

.td-viewer-upsell[hidden] {
    display: none;
}

.td-viewer-upsell__icon {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #2e6da4;
    background: #fff;
}

.td-viewer-upsell__copy {
    min-width: 0;
    flex: 1;
}

.td-viewer-upsell__title {
    display: block;
    color: #1f2a44;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.td-viewer-upsell__body {
    margin: 4px 0 0;
    color: #4a5670;
    font-size: 13px;
    line-height: 1.45;
}

.td-viewer-upsell__cta {
    margin-top: 10px;
    min-height: 32px;
    padding: 5px 12px;
    border: 1px solid #2e6da4;
    border-radius: 8px;
    color: #2e6da4;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
}

.td-viewer-upsell__cta:hover {
    color: #fff;
    background: #2e6da4;
}

.td-viewer-upsell__dismiss {
    flex: 0 0 auto;
    padding: 2px;
    border: 0;
    color: #7b8498;
    background: transparent;
}

.td-viewer-upsell__dismiss:hover {
    color: #1f2a44;
}

.task-details--client .td-viewer-upsell {
    margin-top: 12px;
    margin-bottom: 4px;
}

.task-details--staff .td-viewer-upsell {
    margin-top: 0;
    margin-bottom: 12px;
}

.td-action-zone--done .td-action-zone__btn--approve {
    border-color: #fff;
    color: #12815d;
    background: #fff;
}

.td-action-zone--done .td-action-zone__btn--ghost {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: transparent;
}

.td-action-zone--done .td-action-zone__btn--ghost:hover,
.td-action-zone--done .td-action-zone__btn--ghost[aria-expanded="true"] {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.td-export-menu {
    min-width: 220px;
    padding: 6px 0;
}

.td-export-menu__label {
    display: block;
    font-weight: 600;
}

.td-export-menu__help {
    display: block;
    margin-top: 1px;
    color: var(--td-muted, #898fa9);
    font-size: 11px;
}

.td-export-dropdown .dropdown-toggle::after {
    margin-left: 6px;
}

.td-export-dropdown.is-busy .dropdown-toggle {
    pointer-events: none;
    opacity: 0.7;
}

.td-export-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(22, 28, 42, 0.45);
}

.td-export-overlay[hidden] {
    display: none;
}

.td-export-overlay__card {
    width: min(420px, 100%);
    padding: 28px 24px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(22, 28, 42, 0.22);
    text-align: center;
}

.td-export-overlay__icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border-radius: 50%;
}

.td-export-overlay[data-state="working"] .td-export-overlay__icon {
    border: 3px solid #dce8f6;
    border-top-color: #2e6da4;
    animation: td-export-spin 0.7s linear infinite;
}

.td-export-overlay[data-state="done"] .td-export-overlay__icon,
.td-export-overlay[data-state="error"] .td-export-overlay__icon {
    position: relative;
    background: #e8f7f0;
}

.td-export-overlay[data-state="done"] .td-export-overlay__icon::after,
.td-export-overlay[data-state="error"] .td-export-overlay__icon::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
}

.td-export-overlay[data-state="done"] .td-export-overlay__icon::after {
    width: 10px;
    height: 18px;
    border-right: 3px solid #18a875;
    border-bottom: 3px solid #18a875;
    transform: rotate(45deg) translate(-2px, -2px);
}

.td-export-overlay[data-state="error"] .td-export-overlay__icon {
    background: #fdeeee;
}

.td-export-overlay[data-state="error"] .td-export-overlay__icon::before,
.td-export-overlay[data-state="error"] .td-export-overlay__icon::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 12px;
    width: 18px;
    height: 3px;
    background: #c0392b;
}

.td-export-overlay[data-state="error"] .td-export-overlay__icon::before {
    transform: rotate(45deg);
}

.td-export-overlay[data-state="error"] .td-export-overlay__icon::after {
    transform: rotate(-45deg);
}

.td-export-overlay__title {
    margin: 0 0 8px;
    color: #1d273b;
    font-size: 18px;
    font-weight: 700;
}

.td-export-overlay__copy,
.td-export-overlay__time {
    margin: 0;
    color: #5b647c;
    font-size: 13px;
    line-height: 1.5;
}

.td-export-overlay__time {
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

.td-export-overlay__close {
    margin-top: 18px;
}

@keyframes td-export-spin {
    to {
        transform: rotate(360deg);
    }
}

body.dark-mode .td-export-overlay,
body.color-1E202D .td-export-overlay {
    background: rgba(8, 10, 16, 0.62);
}

body.dark-mode .td-export-overlay__card,
body.color-1E202D .td-export-overlay__card {
    background: #2a303d;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

body.dark-mode .td-export-overlay__title,
body.color-1E202D .td-export-overlay__title {
    color: #f0f3fa;
}

body.dark-mode .td-export-overlay__copy,
body.dark-mode .td-export-overlay__time,
body.color-1E202D .td-export-overlay__copy,
body.color-1E202D .td-export-overlay__time {
    color: #c9d1e6;
}

body.dark-mode .td-export-overlay[data-state="working"] .td-export-overlay__icon,
body.color-1E202D .td-export-overlay[data-state="working"] .td-export-overlay__icon {
    border-color: #4a5164;
    border-top-color: #7eb6ff;
}

.td-overview {
    position: sticky;
    top: 64px;
    z-index: 2;
    padding: 0 0 16px;
    margin: 0 0 8px;
    background: #fbfbfd;
}

.td-overview__title {
    display: block;
    margin: 0 0 10px;
    color: var(--td-ink);
    font-size: 15px;
    font-weight: 700;
}

.td-overview__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 0;
    color: #5b647c;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #eef0f5;
}

.td-overview__link:hover,
.td-overview__link.is-current {
    color: var(--td-ink);
}

.td-overview__link span {
    color: #8b93a8;
    font-size: 12px;
    font-weight: 600;
}

.task-details--client #td-panel-spec,
.task-details--client #td-panel-reference,
.task-details--client #td-panel-linked,
.task-details--client #td-panel-deliverables,
.task-details--client #td-panel-feedback {
    scroll-margin-top: 12px;
}

.task-details--client .td-section--spec .bg-light {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.task-details--client .td-section--spec .mb-2 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 !important;
    padding: 10px 0;
    border-bottom: 1px dashed #eceef3;
}

.task-details--client .td-section--spec .mb-2 strong {
    color: var(--td-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.task-details--client .td-spec-extra {
    display: none;
}

.task-details--client .td-context.is-expanded .td-spec-extra {
    display: flex;
}

.td-spec-toggle {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #356df3;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.td-done-split {
    display: flex;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 0 !important;
}

.td-done-split__viewer {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    min-width: 0;
}

.td-done-split__files {
    flex: 1 1 50%;
    min-width: 0;
}

.td-done-split__files .td-section--files {
    width: 100%;
    max-width: 100%;
    flex: none;
    margin: 0 !important;
    padding: 0 !important;
}

.td-done-split__viewer .viewer-publish-panel,
.td-done-split__viewer .viewer-publish-panel .va-panel {
    height: 100%;
    margin: 0;
}

.td-done-split__viewer .viewer-publish-panel .va-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--td-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--td-surface);
}

.td-done-split__viewer .va-panel__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 14px 14px;
}

.td-done-split .td-section--files .td-file-list,
.task-details--client .td-done-split .td-section--files .td-file-list,
.task-details--staff .td-done-split .td-section--files .td-file-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1101px) {
    .task-details--client .td-section--files .td-file-list,
    .task-details--staff .td-section--files .td-file-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .task-details--client .td-done-split .td-section--files .td-file-list,
    .task-details--staff .td-done-split .td-section--files .td-file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .td-done-split {
        flex-direction: column;
    }

    .td-done-split__viewer,
    .td-done-split__files {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .td-action-zone {
        padding: 14px 16px;
    }

    .td-action-zone__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-details--client .td-overview {
        position: static;
    }

    .task-details--client .td-section--spec .bg-light {
        grid-template-columns: 1fr;
    }
}

/* Dark theme: staff + client task views */
body.dark-mode .task-details,
body.color-1E202D .task-details,
body.dark-mode .task-details-modal .modal-content,
body.color-1E202D .task-details-modal .modal-content,
body.dark-mode .task-view-modal-body,
body.color-1E202D .task-view-modal-body {
    color: var(--td-ink, #f4f6fb);
    background: var(--td-surface, #232833);
}

body.dark-mode .task-details,
body.color-1E202D .task-details {
    --td-ink: #f4f6fb;
    --td-muted: #c9d1e6;
    --td-border: #4a5164;
    --td-surface: #232833;
    --td-subtle: #2d3342;
}

body.dark-mode .task-details h1,
body.dark-mode .task-details h2,
body.dark-mode .task-details h3,
body.dark-mode .task-details h4,
body.dark-mode .task-details h5,
body.dark-mode .task-details h6,
body.color-1E202D .task-details h1,
body.color-1E202D .task-details h2,
body.color-1E202D .task-details h3,
body.color-1E202D .task-details h4,
body.color-1E202D .task-details h5,
body.color-1E202D .task-details h6,
body.dark-mode .task-details .td-title,
body.color-1E202D .task-details .td-title {
    color: #f4f6fb !important;
}

body.dark-mode .td-hero,
body.dark-mode .td-hero__topline,
body.dark-mode .task-details__grid,
body.color-1E202D .td-hero,
body.color-1E202D .td-hero__topline,
body.color-1E202D .task-details__grid {
    background: #232833;
}

body.dark-mode .task-details__sidebar,
body.dark-mode .td-overview,
body.color-1E202D .task-details__sidebar,
body.color-1E202D .td-overview {
    background: #1d212b !important;
}

body.dark-mode .modal-footer.task-details-footer,
body.color-1E202D .modal-footer.task-details-footer {
    background: #1d212b !important;
    border-top-color: #4a5164 !important;
    color: #f4f6fb;
}

body.dark-mode .task-details-footer__hint,
body.color-1E202D .task-details-footer__hint {
    color: #c9d1e6;
}

body.dark-mode .td-task-number,
body.color-1E202D .td-task-number {
    color: #e8edf8;
    border-color: #5a6478;
    background: #2d3342;
}

body.dark-mode .td-hero .td-breadcrumbs,
body.dark-mode .td-hero .td-breadcrumbs a,
body.dark-mode .td-hero__topline .td-breadcrumbs,
body.dark-mode .td-hero__topline .td-breadcrumbs a,
body.dark-mode .td-breadcrumbs__current,
body.color-1E202D .td-hero .td-breadcrumbs,
body.color-1E202D .td-hero .td-breadcrumbs a,
body.color-1E202D .td-hero__topline .td-breadcrumbs,
body.color-1E202D .td-hero__topline .td-breadcrumbs a,
body.color-1E202D .td-breadcrumbs__current {
    color: #d4dae8;
}

body.dark-mode .td-breadcrumbs a:hover,
body.color-1E202D .td-breadcrumbs a:hover {
    color: #8eb0ff !important;
}

body.dark-mode .td-current-status,
body.color-1E202D .td-current-status {
    color: color-mix(in srgb, var(--task-status-color, #356df3) 72%, #f4f6fb);
    border-color: color-mix(in srgb, var(--task-status-color, #356df3) 45%, #3a4152);
    background: color-mix(in srgb, var(--task-status-color, #356df3) 22%, #2a3140);
}

body.dark-mode .td-current-status a,
body.dark-mode .td-current-status a.white-link,
body.dark-mode .td-current-status a.white-link:hover,
body.color-1E202D .td-current-status a,
body.color-1E202D .td-current-status a.white-link,
body.color-1E202D .td-current-status a.white-link:hover {
    color: inherit !important;
}

body.dark-mode .td-staff-meta-strip__label,
body.color-1E202D .td-staff-meta-strip__label {
    color: #d0d7ea;
}

body.dark-mode .td-staff-meta-strip__value,
body.color-1E202D .td-staff-meta-strip__value,
body.dark-mode .td-staff-meta-strip__value .text-off,
body.color-1E202D .td-staff-meta-strip__value .text-off {
    color: #f4f6fb !important;
}

body.dark-mode .td-workflow__label,
body.color-1E202D .td-workflow__label {
    color: #c9d1e6;
}

body.dark-mode .td-workflow__step.is-complete .td-workflow__label,
body.dark-mode .td-workflow__step.is-past .td-workflow__label,
body.color-1E202D .td-workflow__step.is-complete .td-workflow__label,
body.color-1E202D .td-workflow__step.is-past .td-workflow__label {
    color: #dce2f0;
}

body.dark-mode .td-workflow__step.is-current .td-workflow__label,
body.color-1E202D .td-workflow__step.is-current .td-workflow__label {
    color: #ffffff;
}

body.dark-mode .td-workflow__track,
body.color-1E202D .td-workflow__track {
    background: #363d4e;
}

body.dark-mode .td-workflow__marker,
body.color-1E202D .td-workflow__marker {
    border-color: #4a5468;
    background: #232834;
}

body.dark-mode .td-workflow__step.is-current .td-workflow__marker,
body.color-1E202D .td-workflow__step.is-current .td-workflow__marker {
    background: #232834;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--task-status-color, var(--td-primary)) 25%, transparent);
}

body.dark-mode .td-workflow__step.is-past .td-workflow__track,
body.dark-mode .td-workflow__step.is-past .td-workflow__marker,
body.color-1E202D .td-workflow__step.is-past .td-workflow__track,
body.color-1E202D .td-workflow__step.is-past .td-workflow__marker {
    border-color: #555f75;
    background: #555f75;
}

body.dark-mode .td-staff-workflow__content strong,
body.color-1E202D .td-staff-workflow__content strong {
    color: #e6ebf6;
}

body.dark-mode .td-staff-workflow__step.is-complete .td-staff-workflow__content strong,
body.color-1E202D .td-staff-workflow__step.is-complete .td-staff-workflow__content strong {
    color: #dce2f0;
}

body.dark-mode .td-staff-workflow__content small,
body.color-1E202D .td-staff-workflow__content small {
    color: #c9d1e6;
}

body.dark-mode .td-staff-workflow__step.is-current .td-staff-workflow__content strong,
body.color-1E202D .td-staff-workflow__step.is-current .td-staff-workflow__content strong {
    color: #ffffff;
}

body.dark-mode .td-staff-workflow__step:not(:last-child)::before,
body.color-1E202D .td-staff-workflow__step:not(:last-child)::before {
    background: #363d4e;
}

body.dark-mode .td-staff-workflow__marker,
body.color-1E202D .td-staff-workflow__marker {
    border-color: #4a5468;
    background: #232834;
}

body.dark-mode .td-staff-workflow__step.is-current .td-staff-workflow__marker,
body.color-1E202D .td-staff-workflow__step.is-current .td-staff-workflow__marker {
    background: #232834;
    border-color: #f0a500;
    box-shadow: 0 0 0 3px rgba(240, 165, 0, .22);
}

body.dark-mode .td-staff-workflow__step.is-past .td-staff-workflow__marker,
body.dark-mode .td-staff-workflow__step.is-past:not(:last-child)::before,
body.color-1E202D .td-staff-workflow__step.is-past .td-staff-workflow__marker,
body.color-1E202D .td-staff-workflow__step.is-past:not(:last-child)::before {
    border-color: #555f75;
    background: #555f75;
}

body.dark-mode .td-section__title,
body.dark-mode .td-section > strong:first-child,
body.color-1E202D .td-section__title,
body.color-1E202D .td-section > strong:first-child {
    color: #f4f6fb;
}

body.dark-mode .td-empty,
body.dark-mode .td-deliverable__meta,
body.dark-mode .td-client-feedback__hint,
body.color-1E202D .td-empty,
body.color-1E202D .td-deliverable__meta,
body.color-1E202D .td-client-feedback__hint {
    color: #c9d1e6;
}

body.dark-mode .td-description-html,
body.dark-mode .td-description-html p,
body.dark-mode .td-description-html span,
body.dark-mode .td-description-html td,
body.dark-mode .td-description-html th,
body.dark-mode .td-description-html li,
body.dark-mode .td-context,
body.dark-mode .td-context .bg-light,
body.dark-mode .td-section--spec,
body.dark-mode .td-section--spec .mb-2,
body.dark-mode .td-section--spec .mb-2 strong,
body.color-1E202D .td-description-html,
body.color-1E202D .td-description-html p,
body.color-1E202D .td-description-html span,
body.color-1E202D .td-description-html td,
body.color-1E202D .td-description-html th,
body.color-1E202D .td-description-html li,
body.color-1E202D .td-context,
body.color-1E202D .td-context .bg-light,
body.color-1E202D .td-section--spec,
body.color-1E202D .td-section--spec .mb-2,
body.color-1E202D .td-section--spec .mb-2 strong {
    color: #e6ebf6 !important;
    background: transparent !important;
    border-color: #4a5164 !important;
}

body.dark-mode .task-details .text-off,
body.dark-mode .task-details .text-default,
body.color-1E202D .task-details .text-off,
body.color-1E202D .task-details .text-default {
    color: #c9d1e6 !important;
}

body.dark-mode .td-file-list > .td-deliverable,
body.color-1E202D .td-file-list > .td-deliverable {
    background: #2a3140;
    border-color: #4a5164;
}

body.dark-mode .td-file-list > .td-deliverable:hover,
body.dark-mode .td-file-list > .td-deliverable:has(.dropdown.show),
body.color-1E202D .td-file-list > .td-deliverable:hover,
body.color-1E202D .td-file-list > .td-deliverable:has(.dropdown.show) {
    border-color: #63708a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

body.dark-mode .td-deliverable__preview,
body.color-1E202D .td-deliverable__preview {
    border-color: #3d4659;
    background:
        linear-gradient(135deg, rgba(29, 34, 46, .92), rgba(22, 26, 36, .96)),
        repeating-linear-gradient(135deg, #1d222e 0, #1d222e 8px, #232938 8px, #232938 16px);
}

body.dark-mode .td-deliverable__thumbnail--contain,
body.color-1E202D .td-deliverable__thumbnail--contain {
    filter: brightness(0) invert(0.92);
}

body.dark-mode .td-deliverable__preview:not(.td-deliverable__preview--static):hover::after,
body.color-1E202D .td-deliverable__preview:not(.td-deliverable__preview--static):hover::after {
    background: rgba(14, 18, 28, .82);
    color: #ffffff;
}

body.dark-mode .td-deliverable__fallback,
body.color-1E202D .td-deliverable__fallback {
    color: #9aa5bc;
}

body.dark-mode .td-deliverable__name,
body.color-1E202D .td-deliverable__name {
    color: #f4f6fb;
}

body.dark-mode .td-file-type,
body.color-1E202D .td-file-type {
    color: #8eb0ff;
    background: rgba(53, 109, 243, 0.18);
    border: 1px solid rgba(142, 176, 255, 0.25);
}

body.dark-mode .td-deliverable.is-image .td-file-type,
body.color-1E202D .td-deliverable.is-image .td-file-type {
    color: #f6ad55;
    background: rgba(246, 173, 85, 0.15);
    border: 1px solid rgba(246, 173, 85, 0.25);
}

body.dark-mode .td-deliverable.is-archive .td-file-type,
body.color-1E202D .td-deliverable.is-archive .td-file-type {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.18);
    border: 1px solid rgba(196, 181, 253, 0.25);
}

body.dark-mode .td-file-version,
body.color-1E202D .td-file-version {
    color: #d4dae8;
    background: #363d4e;
    border: 1px solid #4a5468;
}

body.dark-mode .task-details .btn-default.text-danger,
body.dark-mode .task-details-modal .btn-default.text-danger,
body.color-1E202D .task-details .btn-default.text-danger,
body.color-1E202D .task-details-modal .btn-default.text-danger {
    color: #ff6b6b !important;
    border-color: #6b758c !important;
}

body.dark-mode .task-details .btn-default.text-danger:hover,
body.dark-mode .task-details-modal .btn-default.text-danger:hover,
body.color-1E202D .task-details .btn-default.text-danger:hover,
body.color-1E202D .task-details-modal .btn-default.text-danger:hover {
    color: #ff8787 !important;
    background: rgba(220, 53, 69, 0.15) !important;
    border-color: #ff6b6b !important;
}

body.dark-mode .task-details .btn-default,
body.dark-mode .task-details-modal .btn-default,
body.color-1E202D .task-details .btn-default,
body.color-1E202D .task-details-modal .btn-default {
    color: #f0f3fa !important;
    background: #3a4152 !important;
    border-color: #6b758c !important;
}

body.dark-mode .task-details .btn-default:hover,
body.dark-mode .task-details-modal .btn-default:hover,
body.color-1E202D .task-details .btn-default:hover,
body.color-1E202D .task-details-modal .btn-default:hover {
    color: #ffffff !important;
    background: #4a5368 !important;
    border-color: #8b95ab !important;
}

body.dark-mode .td-deliverable__actions .btn-primary,
body.color-1E202D .td-deliverable__actions .btn-primary {
    color: #fff !important;
}

body.dark-mode .td-review-actions,
body.color-1E202D .td-review-actions {
    border-color: #2f6b54 !important;
    background: #1d3a31 !important;
}

body.dark-mode .td-action-zone,
body.dark-mode .td-action-zone--todo,
body.dark-mode .td-action-zone--cancelled,
body.color-1E202D .td-action-zone,
body.color-1E202D .td-action-zone--todo,
body.color-1E202D .td-action-zone--cancelled {
    background: #2a3140;
}

body.dark-mode .td-action-zone--inprogress,
body.dark-mode .td-action-zone--qc,
body.color-1E202D .td-action-zone--inprogress,
body.color-1E202D .td-action-zone--qc {
    background: #322848;
}

body.dark-mode .td-action-zone--blocked,
body.color-1E202D .td-action-zone--blocked {
    background: #3a2f18;
}

body.dark-mode .td-action-zone--changes,
body.color-1E202D .td-action-zone--changes {
    background: #3a2226;
}

body.dark-mode .td-action-zone--review,
body.dark-mode .td-action-zone--externalreview,
body.color-1E202D .td-action-zone--review,
body.color-1E202D .td-action-zone--externalreview {
    background: #1d3a31;
}

body.dark-mode .td-action-zone__copy,
body.color-1E202D .td-action-zone__copy {
    color: #f4f6fb;
}

body.dark-mode .td-action-zone__file,
body.dark-mode .td-action-zone .td-external-review-btn,
body.color-1E202D .td-action-zone__file,
body.color-1E202D .td-action-zone .td-external-review-btn {
    color: #c9d1e6;
}

body.dark-mode .td-action-zone__btn--ghost,
body.color-1E202D .td-action-zone__btn--ghost {
    border-color: #6b758c;
    color: #f0f3fa;
    background: #3a4152;
}

body.dark-mode .td-action-zone__btn--ghost:hover,
body.dark-mode .td-action-zone__btn--ghost:focus,
body.color-1E202D .td-action-zone__btn--ghost:hover,
body.color-1E202D .td-action-zone__btn--ghost:focus {
    background: #4a5368;
    border-color: #8b95ab;
    color: #ffffff;
}

body.dark-mode .td-action-zone--done,
body.color-1E202D .td-action-zone--done {
    background: #183d2e;
}

body.dark-mode .td-action-zone--done .td-action-zone__btn--approve,
body.color-1E202D .td-action-zone--done .td-action-zone__btn--approve {
    border-color: #2fb380;
    color: #ffffff;
    background: #208b63;
}

body.dark-mode .td-action-zone--done .td-action-zone__btn--approve:hover,
body.color-1E202D .td-action-zone--done .td-action-zone__btn--approve:hover {
    background: #1b7453;
}

body.dark-mode .td-action-zone__btn--approve,
body.color-1E202D .td-action-zone__btn--approve {
    border-color: #20a373;
    color: #ffffff;
    background: #1b8760;
}

body.dark-mode .td-action-zone__btn--approve:hover,
body.color-1E202D .td-action-zone__btn--approve:hover {
    border-color: #27bf87;
    background: #167050;
    color: #ffffff;
}

body.dark-mode .td-action-zone__thumb,
body.color-1E202D .td-action-zone__thumb {
    background: #222735;
    border-color: #3d4659;
}

body.dark-mode .td-action-zone__thumb img[src*="gltf"],
body.dark-mode .td-action-zone__thumb img[src*="usdz"],
body.color-1E202D .td-action-zone__thumb img[src*="gltf"],
body.color-1E202D .td-action-zone__thumb img[src*="usdz"] {
    filter: brightness(0) invert(0.92);
}

body.dark-mode .td-overview__link,
body.color-1E202D .td-overview__link {
    color: #d4dae8;
    border-bottom-color: #3d4456;
}

body.dark-mode .td-overview__link:hover,
body.dark-mode .td-overview__link.is-current,
body.color-1E202D .td-overview__link:hover,
body.color-1E202D .td-overview__link.is-current {
    color: #ffffff;
}

body.dark-mode .td-overview__link span,
body.color-1E202D .td-overview__link span {
    color: #c9d1e6;
}

body.dark-mode .td-linked-row__kind,
body.color-1E202D .td-linked-row__kind {
    color: #c9d1e6;
}

body.dark-mode .td-linked-row__title,
body.color-1E202D .td-linked-row__title {
    color: #f4f6fb;
}

body.dark-mode .td-linked-row.is-open-blocker,
body.color-1E202D .td-linked-row.is-open-blocker {
    background: #3a2f18;
    border-color: #c49212;
}

body.dark-mode .td-linked-row__status,
body.color-1E202D .td-linked-row__status {
    background: #2d3342;
}

body.dark-mode .td-client-feedback textarea.form-control,
body.dark-mode .td-client-feedback .comment_description,
body.color-1E202D .td-client-feedback textarea.form-control,
body.color-1E202D .td-client-feedback .comment_description {
    color: #f4f6fb !important;
    background: #2d3342 !important;
    border-color: #5a6478 !important;
}

body.dark-mode .task-details .form-control,
body.dark-mode .task-details .form-select,
body.color-1E202D .task-details .form-control,
body.color-1E202D .task-details .form-select {
    color: #f4f6fb;
    background: #2d3342;
    border-color: #5a6478;
}

body.dark-mode .td-activity__toggle,
body.dark-mode .task-details .td-activity .box-title,
body.color-1E202D .td-activity__toggle,
body.color-1E202D .task-details .td-activity .box-title {
    color: #f4f6fb;
}

body.dark-mode .td-timesheet-toggle,
body.dark-mode .td-hero__time,
body.color-1E202D .td-timesheet-toggle,
body.color-1E202D .td-hero__time {
    color: #f4f6fb;
}

body.dark-mode .viewer-publish-panel,
body.dark-mode .viewer-publish-panel .va-panel,
body.color-1E202D .viewer-publish-panel,
body.color-1E202D .viewer-publish-panel .va-panel {
    color: #f4f6fb;
    background: #2a3140;
    border-color: #4a5164;
}

body.dark-mode .task-details .comment-container,
body.dark-mode .task-details .media-body,
body.color-1E202D .task-details .comment-container,
body.color-1E202D .task-details .media-body {
    color: #e6ebf6;
}

body.dark-mode .td-vntana-refs,
body.color-1E202D .td-vntana-refs {
    background: #2a3140 !important;
    border-color: #4a5164 !important;
    color: #e6ebf6 !important;
}

body.dark-mode .td-vntana-refs h6,
body.color-1E202D .td-vntana-refs h6 {
    color: #f4f6fb !important;
}

body.dark-mode .td-vntana-ref,
body.color-1E202D .td-vntana-ref {
    background: #323848 !important;
    color: #e6ebf6 !important;
}

body.dark-mode .td-vntana-refs a,
body.color-1E202D .td-vntana-refs a {
    color: #8eb0ff !important;
}

body.dark-mode .td-vntana-refs span,
body.color-1E202D .td-vntana-refs span {
    color: #c9d1e6 !important;
}


/* ---------------------------------------------------------------------------
   Quote bar (staff): one strip above the task body, one decision
   --------------------------------------------------------------------------- */

.tqbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    margin-bottom: 14px;
    border: 1px solid #ecd9b0;
    border-radius: 8px;
    background: #fffdf7;
}

.tqbar--sent {
    border-color: #d8e2f8;
    background: #fafbff;
}

.tqbar--rework {
    border-color: #f7d6e4;
    background: #fffcfd;
}

.tqbar--rework.tqbar--sent {
    border-color: #f5c2d7;
    background: #fff8fb;
}

.tqbar--rework .tqbar__icon {
    color: #e83e8c;
}

.tqbar--rework .tqbar__text strong {
    color: #c2185b;
}

.tqbar--rework #rw-send:not(:disabled) {
    background-color: #e83e8c;
    border-color: #e83e8c;
    color: #fff;
}

.tqbar--hold {
    border-color: #ffeeba;
    background: #fffdf5;
}

.tqbar--hold .tqbar__icon {
    color: #d39e00;
}

.tqbar--hold .tqbar__text strong,
.tqbar--hold .tqbar__text span {
    color: #856404;
}

.tqbar__icon {
    flex: 0 0 auto;
    color: #b9760d;
}

.tqbar--sent .tqbar__icon {
    color: #4864d9;
}

.tqbar__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.tqbar__text strong {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.tqbar__text span {
    font-size: 12.5px;
    color: #7b8298;
}

.tqbar__select {
    flex: 0 0 auto;
    width: 130px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9dee9;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #2f3546;
}

.tqbar__send {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
}

.tqbar__send:disabled {
    background: #eceef3;
    border-color: #eceef3;
    color: #a6adbf;
    opacity: 1;
}

@media (max-width: 700px) {
    .tqbar {
        flex-wrap: wrap;
    }

    .tqbar__text {
        flex: 1 1 100%;
    }

    .tqbar__select,
    .tqbar__send {
        flex: 1 1 auto;
    }
}

body.dark-mode .tqbar,
body.color-1E202D .tqbar {
    background: #323848 !important;
    border-color: #3a4055 !important;
}

body.dark-mode .tqbar__text strong,
body.color-1E202D .tqbar__text strong {
    color: #e6ebf6 !important;
}

body.dark-mode .tqbar__text span,
body.color-1E202D .tqbar__text span {
    color: #c9d1e6 !important;
}

body.dark-mode .tqbar__select,
body.color-1E202D .tqbar__select {
    background: #2b3040 !important;
    border-color: #3a4055 !important;
    color: #e6ebf6 !important;
}

body.dark-mode .tqbar__send:disabled,
body.color-1E202D .tqbar__send:disabled {
    background: #3a4055 !important;
    border-color: #3a4055 !important;
    color: #8b93a7 !important;
}

.tqbar__tier {
    flex: 0 0 auto;
    padding: 2px 8px;
    border: 1px solid #d9dee9;
    border-radius: 999px;
    background: #fff;
    font-size: 11.5px;
    color: #5c6479;
    white-space: nowrap;
}

body.dark-mode .tqbar__tier,
body.color-1E202D .tqbar__tier {
    background: #2b3040 !important;
    border-color: #3a4055 !important;
    color: #c9d1e6 !important;
}

/* ---------------------------------------------------------------------------
   Dark mode: Viewer upsell banner
   --------------------------------------------------------------------------- */
body.dark-mode .td-viewer-upsell,
body.color-1E202D .td-viewer-upsell {
    background: #202737;
    border-color: #384661;
}

body.dark-mode .td-viewer-upsell__icon,
body.color-1E202D .td-viewer-upsell__icon {
    background: #1b202c;
    color: #79a1f7;
    border: 1px solid #33405b;
}

body.dark-mode .td-viewer-upsell__title,
body.color-1E202D .td-viewer-upsell__title {
    color: #f4f6fb;
}

body.dark-mode .td-viewer-upsell__body,
body.color-1E202D .td-viewer-upsell__body {
    color: #c9d1e6;
}

body.dark-mode .td-viewer-upsell__cta,
body.color-1E202D .td-viewer-upsell__cta {
    background: #2e6da4;
    color: #ffffff;
    border-color: #4182c0;
}

body.dark-mode .td-viewer-upsell__cta:hover,
body.color-1E202D .td-viewer-upsell__cta:hover {
    background: #397ebd;
    color: #ffffff;
}

body.dark-mode .td-viewer-upsell__dismiss,
body.color-1E202D .td-viewer-upsell__dismiss {
    color: #8b93a7;
}

body.dark-mode .td-viewer-upsell__dismiss:hover,
body.color-1E202D .td-viewer-upsell__dismiss:hover {
    color: #f4f6fb;
}

/* ---------------------------------------------------------------------------
   Dark mode: Rework, Hold, and Sent quote bars
   --------------------------------------------------------------------------- */
body.dark-mode .tqbar--rework,
body.color-1E202D .tqbar--rework {
    background: #2f202a !important;
    border-color: #4f2a3e !important;
}

body.dark-mode .tqbar--rework.tqbar--sent,
body.color-1E202D .tqbar--rework.tqbar--sent {
    background: #281d24 !important;
    border-color: #452436 !important;
}

body.dark-mode .tqbar--rework .tqbar__icon,
body.color-1E202D .tqbar--rework .tqbar__icon {
    color: #f06292 !important;
}

body.dark-mode .tqbar--rework .tqbar__text strong,
body.color-1E202D .tqbar--rework .tqbar__text strong {
    color: #f48fb1 !important;
}

body.dark-mode .tqbar--rework .tqbar__text span,
body.color-1E202D .tqbar--rework .tqbar__text span {
    color: #d8c7cf !important;
}

body.dark-mode .tqbar--rework #rw-send:not(:disabled),
body.color-1E202D .tqbar--rework #rw-send:not(:disabled) {
    background-color: #d81b60 !important;
    border-color: #e91e63 !important;
    color: #ffffff !important;
}

body.dark-mode .tqbar--hold,
body.color-1E202D .tqbar--hold {
    background: #362c19 !important;
    border-color: #594420 !important;
}

body.dark-mode .tqbar--hold .tqbar__icon,
body.color-1E202D .tqbar--hold .tqbar__icon {
    color: #f6c343 !important;
}

body.dark-mode .tqbar--hold .tqbar__text strong,
body.color-1E202D .tqbar--hold .tqbar__text strong {
    color: #ffd166 !important;
}

body.dark-mode .tqbar--hold .tqbar__text span,
body.color-1E202D .tqbar--hold .tqbar__text span {
    color: #e5d3b0 !important;
}

body.dark-mode .tqbar--sent,
body.color-1E202D .tqbar--sent {
    background: #242c3d !important;
    border-color: #36425a !important;
}

body.dark-mode .tqbar__select::placeholder,
body.color-1E202D .tqbar__select::placeholder,
body.dark-mode .task-details .form-control::placeholder,
body.color-1E202D .task-details .form-control::placeholder {
    color: #838da3 !important;
}

/* ---------------------------------------------------------------------------
   Dark mode: Section lines and details
   --------------------------------------------------------------------------- */
body.dark-mode .td-section,
body.color-1E202D .td-section {
    border-top-color: #3a4152 !important;
}

body.dark-mode .td-staff-meta-strip__value a,
body.color-1E202D .td-staff-meta-strip__value a {
    color: #8eb0ff;
}

body.dark-mode .td-staff-meta-strip__value a:hover,
body.color-1E202D .td-staff-meta-strip__value a:hover {
    color: #b4cbff;
}

body.dark-mode .td-staff-meta-strip__value a.text-off,
body.color-1E202D .td-staff-meta-strip__value a.text-off {
    color: #9aa5bc !important;
}

body.dark-mode .td-description-clip.is-collapsed::after,
body.color-1E202D .td-description-clip.is-collapsed::after {
    background: linear-gradient(180deg, rgba(35, 40, 51, 0), #232833);
}

/* ---------------------------------------------------------------------------
   Dark mode: Dropdowns and export menu
   --------------------------------------------------------------------------- */
body.dark-mode .td-deliverable__actions .dropdown-menu,
body.dark-mode .td-action-zone .dropdown-menu,
body.color-1E202D .td-deliverable__actions .dropdown-menu,
body.color-1E202D .td-action-zone .dropdown-menu {
    background-color: #252b38;
    border: 1px solid #3d4659;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

body.dark-mode .td-export-menu .dropdown-item,
body.color-1E202D .td-export-menu .dropdown-item {
    color: #d4dae8;
}

body.dark-mode .td-export-menu .dropdown-item:hover,
body.color-1E202D .td-export-menu .dropdown-item:hover {
    background-color: #313848;
    color: #ffffff;
}

body.dark-mode .td-export-menu__label,
body.color-1E202D .td-export-menu__label {
    color: #f4f6fb;
}

body.dark-mode .td-export-menu__help,
body.color-1E202D .td-export-menu__help {
    color: #9aa5bc;
}

body.dark-mode .td-export-menu .dropdown-header,
body.color-1E202D .td-export-menu .dropdown-header {
    color: #9aa5bc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------------
   Dark mode: Subtasks
   --------------------------------------------------------------------------- */
body.dark-mode .task-details .sub-task-card,
body.dark-mode .sub-task-card,
body.color-1E202D .task-details .sub-task-card,
body.color-1E202D .sub-task-card {
    background: #252a36 !important;
    border-color: #3d4557 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode .task-details .sub-task-card:hover,
body.dark-mode .sub-task-card:hover,
body.color-1E202D .task-details .sub-task-card:hover,
body.color-1E202D .sub-task-card:hover {
    border-color: #5c6c94 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .sub-task-title,
body.color-1E202D .sub-task-title {
    color: #e6ebf6 !important;
}

body.dark-mode .sub-task-title:hover,
body.color-1E202D .sub-task-title:hover {
    color: #8eb0ff !important;
}

body.dark-mode .sub-task-card:has(.text-line-through),
body.color-1E202D .sub-task-card:has(.text-line-through) {
    background-color: #1e222d !important;
    border-color: #333a4a !important;
}

/* ---------------------------------------------------------------------------
   Dark mode: VNTANA, Modal header, Feedback
   --------------------------------------------------------------------------- */
body.dark-mode .task-details .alert-light,
body.color-1E202D .task-details .alert-light {
    background-color: #252a36 !important;
    color: #c9d1e6 !important;
    border: 1px solid #3c4456 !important;
}

body.dark-mode .task-details .alert-light code,
body.color-1E202D .task-details .alert-light code {
    background-color: #1c202a !important;
    color: #8eb0ff !important;
}

body.dark-mode .task-details .border-top,
body.color-1E202D .task-details .border-top {
    border-top-color: #3a4152 !important;
}

body.dark-mode .td-client-feedback .upload-file-button,
body.color-1E202D .td-client-feedback .upload-file-button {
    color: #79a1f7 !important;
}

body.dark-mode .td-client-feedback .upload-file-button:hover,
body.color-1E202D .td-client-feedback .upload-file-button:hover {
    color: #9cbaff !important;
}

body.dark-mode .td-client-feedback .client-comment .badge,
body.color-1E202D .td-client-feedback .client-comment .badge {
    background: rgba(53, 109, 243, 0.2) !important;
    color: #8eb0ff !important;
    border: 1px solid rgba(142, 176, 255, 0.25);
}

body.dark-mode .task-details-modal .modal-header,
body.color-1E202D .task-details-modal .modal-header {
    border-bottom-color: #3a4152;
    background: #232833;
}
