:root {
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #e2e8f0;
    --app-border-strong: #cbd5e1;
    --app-text: #111827;
    --app-muted: #64748b;
    --app-primary: #2563eb;
    --app-primary-dark: #1d4ed8;
    --app-primary-soft: #eff6ff;
    --app-success: #059669;
    --app-warning: #d97706;
    --app-danger: #dc2626;
    --app-info: #0284c7;
    --app-sidebar: #0f172a;
    --app-sidebar-soft: #172033;
    --app-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --app-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --topbar-height: 64px;
    --sidebar-width: 256px;
    --sidebar-expanded-width: 256px;
    --sidebar-collapsed-width: 76px;
}

.project-required-invalid {
    border-color: var(--app-danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.12) !important;
}

.project-required-feedback {
    display: block;
    margin-top: 0.25rem;
    color: var(--app-danger);
    font-size: 0.8125rem;
    line-height: 1.35;
}

.iteration-row .btn {
    width: 78px;
    flex: 0 0 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.code-textarea {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.perf-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.perf-metric {
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface-soft);
}

.perf-metric span {
    display: block;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
}

.perf-metric strong {
    display: block;
    margin-top: 8px;
    font-size: 21px;
    line-height: 1.15;
}

.run-log-box {
    max-height: 340px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #0f172a;
    color: #dbeafe;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.run-log-line {
    padding: 3px 0;
    word-break: break-word;
}

.run-log-line span {
    color: #94a3b8;
}

.run-log-line.error {
    color: #fecaca;
}

.run-log-line.warning {
    color: #fde68a;
}

.performance-filter-bar {
    display: grid;
    grid-template-columns: minmax(120px, 150px) minmax(120px, 150px) minmax(160px, 220px) auto;
    align-items: center;
    gap: 10px;
}

.performance-report-filter-bar {
    grid-template-columns: minmax(160px, 220px) auto;
    justify-content: start;
}

.performance-search-input {
    max-width: 220px;
}

.performance-filter-bar .btn {
    white-space: nowrap;
}

.performance-filter-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
}

.performance-list-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.performance-list-card > .d-flex,
.performance-list-card > .alert,
.performance-list-card > .filter-bar {
    flex: 0 0 auto;
}

.performance-list-card .list-page-footer {
    background: var(--app-surface);
}

.performance-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.performance-progress-status {
    min-width: 112px;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.performance-alert-module {
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    overflow: hidden;
}

.performance-alert-title {
    padding: 12px 16px;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    font-size: 14px;
    font-weight: 800;
    background: #fef3c7;
}

.performance-alert-list {
    display: grid;
    gap: 8px;
    padding: 12px 16px;
}

.performance-alert-item {
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
}

.performance-alert-item::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 999px;
    background: #d97706;
    vertical-align: middle;
}

.performance-stage-metric-list {
    display: grid;
    gap: 18px;
}

.performance-stage-metric-section {
    display: grid;
    gap: 10px;
}

.performance-stage-metric-title {
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.performance-summary-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
}

.performance-summary-table {
    min-width: 1180px;
    margin-bottom: 0;
}

.performance-summary-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--app-surface-soft);
}

.performance-detail-shell {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.performance-detail-fixed {
    flex: 0 0 auto;
}

.performance-detail-fixed .page-card {
    margin-bottom: 14px;
}

.performance-detail-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-bottom: 18px;
}

.performance-form-page {
    padding-bottom: 0;
}

.performance-form-card {
    height: calc(100vh - var(--topbar-height) - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}

.performance-form-card form {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.performance-form-scroll {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 12px;
}

.performance-form-scroll > .row {
    margin-right: 0;
    margin-left: 0;
}

.performance-form-scroll > .row > [class*="col-"],
.performance-form-scroll .single-field .row > [class*="col-"] {
    min-width: 0;
}

.performance-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 0 0;
    margin-top: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0), var(--app-surface) 22%);
    border-top: 1px solid var(--app-border);
}

.compact-textarea {
    min-height: 132px;
    resize: vertical;
}

.performance-form-card textarea[name="steps_json"] {
    min-height: 220px;
    resize: vertical;
}

.project-combobox {
    position: relative;
}

.project-combobox-toggle {
    min-height: 40px;
}

.project-combobox-menu {
    display: none;
    position: absolute;
    z-index: 1080;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    box-shadow: var(--app-shadow-sm);
}

.project-combobox.open .project-combobox-menu {
    display: block;
}

.project-option {
    width: 100%;
    min-height: 34px;
    display: block;
    border: 0;
    border-radius: 6px;
    padding: 7px 9px;
    background: transparent;
    color: var(--app-text);
    text-align: left;
}

.project-option:hover {
    background: var(--app-primary-soft);
}

.performance-help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--app-info);
    cursor: help;
    outline: none;
}

.performance-help-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 1080;
    width: 280px;
    padding: 10px 12px;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--app-text);
    box-shadow: var(--app-shadow-sm);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: normal;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}

.performance-help-tip:hover .performance-help-popover,
.performance-help-tip:focus .performance-help-popover,
.performance-help-tip:focus-within .performance-help-popover {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.performance-stage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.performance-stage-actions {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.performance-worker-control {
    width: 180px;
}

.performance-parameter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.performance-parameter-textarea {
    flex: 0 1 50%;
    max-width: 50%;
}

.performance-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 0;
    min-width: 280px;
}

.performance-file-upload .form-control {
    max-width: 420px;
}

.performance-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    padding: 6px 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--app-text);
    font-size: 13px;
}

.performance-file-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Defect attachment controls keep each selected file independently visible. */
.defect-attachment-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.defect-attachment-file-input {
    flex: 0 0 250px;
    max-width: 250px;
}

.defect-attachment-paste-zone {
    display: flex;
    flex: 1 1 360px;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

.defect-attachment-preview-list,
.defect-existing-attachment-list {
    display: grid;
    gap: 8px;
    width: min(100%, 680px);
    margin-top: 12px;
}

.defect-attachment-preview-item,
.defect-existing-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    padding: 6px 8px;
    border: 1px solid #d9e2ef;
    border-radius: 6px;
    background: #f8fafc;
}

.defect-existing-attachment {
    width: 100%;
}

.defect-existing-attachment-link {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #334155;
    text-decoration: none;
}

.defect-existing-attachment:hover {
    border-color: #93c5fd;
    background: #f1f7ff;
}

.defect-existing-attachment-link:hover {
    color: #1d4ed8;
}

.defect-attachment-thumbnail,
.defect-existing-attachment img {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 1px solid #d9e2ef;
    border-radius: 4px;
}

.defect-attachment-file-icon {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.defect-attachment-name,
.defect-existing-attachment-link > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.defect-attachment-remove {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
}

.defect-attachment-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.defect-rich-editor {
    min-height: 144px;
    padding: 0.375rem 0.75rem;
    overflow: auto;
    white-space: normal;
}

.defect-rich-editor[contenteditable="true"] {
    background: #fff;
}

.defect-rich-editor[contenteditable="false"] {
    background: #f8fafc;
}

.defect-rich-editor:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.defect-rich-editor img,
.defect-rich-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border: 1px solid #d9e2ef;
    border-radius: 6px;
}

.defect-rich-editor img.defect-rich-image-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.defect-rich-content img {
    cursor: zoom-in;
}

.defect-rich-content[contenteditable="true"] img {
    cursor: default;
}

.defect-rich-placeholder:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.defect-rich-image-modal .modal-dialog {
    max-width: min(1100px, calc(100vw - 48px));
}

.defect-rich-image-modal img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    margin: 0 auto;
}

@media (max-width: 576px) {
    .defect-attachment-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .defect-attachment-file-input {
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }

    .defect-attachment-paste-zone {
        flex-basis: auto;
        min-height: 42px;
    }

    .defect-attachment-preview-list,
    .defect-existing-attachment-list {
        width: 100%;
    }
}

.performance-parameter-popover {
    width: 380px;
    max-width: min(380px, calc(100vw - 48px));
    white-space: normal;
    line-height: 1.45;
    left: 0;
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateY(4px);
    text-align: left;
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 13px;
    color: #111827;
}

.performance-parameter-popover span {
    display: block;
}

.performance-parameter-popover .parameter-tip-indent {
    padding-left: 2em;
}

.performance-parameter-popover .parameter-tip-code {
    padding-left: 6em;
}

.performance-parameter-tip:hover .performance-parameter-popover,
.performance-parameter-tip:focus .performance-parameter-popover,
.performance-parameter-tip:focus-within .performance-parameter-popover {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .performance-parameter-row {
        flex-direction: column;
    }

    .performance-parameter-textarea {
        max-width: 100%;
        width: 100%;
        flex-basis: auto;
    }

    .performance-file-upload {
        width: 100%;
    }
}

.performance-stage-list {
    display: grid;
    gap: 12px;
}

.performance-stage-card {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface-soft);
}

.scenario-step-list {
    display: grid;
    gap: 12px;
}

.scenario-step-card {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface-soft);
}

.scenario-step-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.performance-single-url-row,
.scenario-step-url-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.performance-single-method,
.scenario-step-method {
    flex: 0 0 240px;
}

.performance-single-url,
.scenario-step-url {
    flex: 1 1 520px;
    max-width: 980px;
}

.performance-single-url {
    max-width: 760px;
}

.performance-stage-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.performance-toast {
    position: fixed;
    top: calc(var(--topbar-height) + 18px);
    left: 50%;
    z-index: 4000;
    transform: translateX(-50%) translateY(-10px);
    min-width: 260px;
    max-width: min(520px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    box-shadow: var(--app-shadow-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    text-align: center;
    font-weight: 700;
}

.performance-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.performance-toast.success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.performance-toast.danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

@media (max-width: 1200px) {
    .perf-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .performance-filter-bar,
    .performance-report-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .perf-metric-grid {
        grid-template-columns: 1fr;
    }

    .performance-filter-bar,
    .performance-report-filter-bar {
        grid-template-columns: 1fr;
    }

    .performance-form-card {
        height: auto;
        min-height: calc(100vh - var(--topbar-height) - 24px);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 360px;
}

body {
    margin: 0;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

html.has-fixed-viewport-page,
html.has-fixed-viewport-page body {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

a {
    color: inherit;
}

.app-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--topbar-height);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    transition: left .28s cubic-bezier(.22, 1, .36, 1), width .28s cubic-bezier(.22, 1, .36, 1);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.global-project-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.global-project-label {
    display: none;
    white-space: nowrap;
    font-weight: 600;
}

.global-project-filter .project-search-select {
    width: 170px;
    min-width: 170px;
}

.global-project-filter .project-search-select-toggle {
    min-height: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    border-color: var(--app-border);
    color: var(--app-text);
    font-weight: 700;
    padding: 4px 10px;
    box-shadow: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--app-text);
    font-weight: 800;
    font-size: 18px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.sidebar-toggle,
.topbar-link,
.user-trigger {
    border: 1px solid var(--app-border);
    background: #fff;
    color: var(--app-text);
    min-height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sidebar-toggle {
    width: 40px;
    font-size: 20px;
    display: none;
}

.topbar-link {
    padding: 0 14px;
    text-decoration: none;
    color: var(--app-primary);
    background: var(--app-primary-soft);
    border-color: #bfdbfe;
    font-weight: 700;
}

.topbar-link:hover,
.user-trigger:hover,
.sidebar-toggle:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.11);
}

.user-trigger {
    padding: 4px 10px 4px 4px;
    cursor: pointer;
}

.user-avatar {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: #0f172a;
    font-weight: 800;
    text-transform: uppercase;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.assistant-trigger,
.assistant-close {
    border: 1px solid var(--app-border);
    background: #fff;
    color: var(--app-text);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.assistant-trigger {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--app-primary);
    font-size: 18px;
}

.assistant-trigger:hover,
.assistant-close:hover {
    border-color: #93c5fd;
    color: var(--app-primary);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.11);
}

.assistant-panel {
    position: fixed;
    z-index: 1035;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid var(--app-border);
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
}

.assistant-panel.open {
    transform: translateX(0);
    visibility: visible;
}

.assistant-panel-header {
    min-height: 58px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--app-border);
}

.assistant-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--app-text);
}

.assistant-panel-title i {
    color: var(--app-primary);
}

.assistant-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.assistant-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
}

.assistant-empty {
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.7;
}

.assistant-message {
    max-width: 92%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.assistant-message.user {
    margin-left: auto;
    color: #fff;
    background: var(--app-primary);
}

.assistant-message.assistant {
    margin-right: auto;
    color: var(--app-text);
    background: #fff;
    border: 1px solid var(--app-border);
}

.assistant-loading {
    color: var(--app-muted);
    font-size: 13px;
    margin: 8px 0 12px;
}

.assistant-sources {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: var(--app-muted);
}

.assistant-sources-title {
    margin-bottom: 4px;
    font-weight: 700;
}

.assistant-source-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-composer {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid var(--app-border);
}

.assistant-input {
    width: 100%;
    resize: vertical;
    min-height: 76px;
    max-height: 180px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    outline: none;
}

.assistant-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.assistant-composer-footer {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.assistant-hint {
    color: var(--app-muted);
    font-size: 11px;
}

.assistant-submit {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .assistant-panel {
        width: 100vw;
    }

    .assistant-hint {
        display: none;
    }
}

.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow-sm);
    padding: 8px;
    z-index: 3000;
}

.user-dropdown {
    position: relative;
    z-index: 3001;
}

.user-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 8px);
    min-width: 132px;
}

.user-dropdown .dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-content {
    min-height: 100vh;
    padding-top: var(--topbar-height);
}

body.has-fixed-viewport-page .main-content {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

html.has-workload-page,
html.has-workload-page body,
html.has-workload-page .main-content {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

html.has-workload-page .main-content {
    padding-top: 0;
}

.app-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1030;
    padding: 22px 16px;
    background: var(--app-sidebar);
    color: #e5e7eb;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.12);
    transition: width .28s cubic-bezier(.22, 1, .36, 1), padding .28s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease;
}

.app-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-section + .sidebar-section {
    margin-top: 28px;
}

.sidebar-caption {
    padding: 0 12px 9px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    max-height: 28px;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    transition: opacity .2s ease, transform .28s cubic-bezier(.22, 1, .36, 1), max-height .28s cubic-bezier(.22, 1, .36, 1), padding .28s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin: 4px 0;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font: inherit;
    text-align: left;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: width .28s cubic-bezier(.22, 1, .36, 1), height .28s cubic-bezier(.22, 1, .36, 1), min-height .28s cubic-bezier(.22, 1, .36, 1), gap .28s cubic-bezier(.22, 1, .36, 1), padding .28s cubic-bezier(.22, 1, .36, 1), margin .28s cubic-bezier(.22, 1, .36, 1), background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link i {
    width: 22px;
    color: #93c5fd;
    font-size: 18px;
    flex: 0 0 22px;
    text-align: center;
    transition: width .28s cubic-bezier(.22, 1, .36, 1), flex-basis .28s cubic-bezier(.22, 1, .36, 1), font-size .22s ease;
}

.sidebar-link > span {
    min-width: 0;
    max-width: 156px;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    transition: max-width .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.sidebar-link.active i {
    color: #fff;
}

.sidebar-link .sidebar-caret {
    margin-left: auto;
    width: 14px;
    flex: 0 0 14px;
    font-size: 13px;
    opacity: 1;
    transition: transform .18s ease, opacity .18s ease, width .28s cubic-bezier(.22, 1, .36, 1), flex-basis .28s cubic-bezier(.22, 1, .36, 1);
}

#autoInterfaceMenu {
    display: none;
}

#autoInterfaceMenu.show {
    display: block;
}

.sidebar-menu-group.open .sidebar-caret,
.sidebar-link[aria-expanded="true"] .sidebar-caret {
    transform: rotate(180deg);
}

.sidebar-sublink {
    width: calc(100% - 34px);
    min-height: 34px;
    display: flex;
    align-items: center;
    margin: 3px 0 3px 34px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: #cbd5e1;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-sublink.active {
    color: #fff;
    background: rgba(37, 99, 235, 0.35);
}

.content-with-sidebar,
.main-content > .container,
.main-content > .container-fluid,
.main-content > .content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 28px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left .28s cubic-bezier(.22, 1, .36, 1), width .28s cubic-bezier(.22, 1, .36, 1);
}

body.has-fixed-viewport-page .content-with-sidebar,
body.has-fixed-viewport-page .main-content > .container,
body.has-fixed-viewport-page .main-content > .container-fluid,
body.has-fixed-viewport-page .main-content > .content-wrapper {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    min-height: 0;
    overflow: hidden;
}

body.has-fixed-viewport-page .main-content > .container > .row,
body.has-fixed-viewport-page .main-content > .container-fluid > .row {
    height: 100%;
    min-height: 0;
}

.container,
.container-fluid,
.content-wrapper {
    max-width: none;
}

.container.mt-4,
.container-fluid {
    margin-top: 0 !important;
}

.row {
    --bs-gutter-x: 18px;
}

.content-with-sidebar > .col-md-9,
.content-with-sidebar .col-md-9 {
    width: 100%;
    max-width: none;
    flex: 0 0 100%;
}

.main-content > .container > .row > .col-md-9 {
    width: 100%;
    max-width: none;
    flex: 0 0 100%;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--app-text);
    font-weight: 800;
    letter-spacing: 0;
}

h1,
h3 {
    margin-bottom: 18px;
}

.page-title,
.content-header h1,
h3:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
}

h3:first-child::before,
.content-header h1::before {
    content: "";
    width: 8px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2563eb, #0f766e);
    display: inline-block;
}

.card,
.modal-content,
.table-responsive {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow-sm);
    background: var(--app-surface);
}

.card {
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--app-border);
    padding: 18px 20px;
}

.card-body {
    padding: 20px;
}

.project-search-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.project-search-select {
    position: relative;
    width: 100%;
    min-width: 120px;
    z-index: 20;
}

.project-search-select.open {
    z-index: 1080;
}

.project-search-select-toggle {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background: #fff;
    color: #111827;
    text-align: left;
}

.project-search-select.sm .project-search-select-toggle {
    min-height: 31px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.project-search-select-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-search-select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 180px;
    max-height: 320px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    overflow: hidden;
}

.project-search-select.open-up .project-search-select-menu {
    top: auto;
    bottom: calc(100% + 4px);
}

.project-search-select.open .project-search-select-menu {
    display: block;
}

.project-search-select-menu.pagination-page-size-menu-floating {
    display: block;
    position: fixed;
    top: auto;
    right: auto;
    z-index: 10000;
}

.project-search-select-search {
    padding: 8px;
    border-bottom: 1px solid #edf0f2;
}

.project-search-select-search input {
    height: 34px;
    font-size: 0.9rem;
}

.project-search-select-options {
    max-height: 248px;
    overflow-y: auto;
    padding: 6px 0;
    overscroll-behavior: contain;
}

.project-search-select-option {
    width: 100%;
    display: block;
    padding: 7px 12px;
    border: 0;
    background: #fff;
    color: #111827;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-search-select-option:hover,
.project-search-select-option.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #60a5fa;
}

.project-search-select-empty {
    display: none;
    padding: 12px;
    color: #6b7280;
    text-align: center;
}

.filter-dropdown-menu {
    overflow: hidden;
}

.filter-dropdown-search {
    position: sticky;
    top: 0;
    z-index: 1;
    margin-bottom: 8px;
}

.filter-dropdown-options {
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.card-footer {
    background: var(--app-surface-soft);
    border-top: 1px solid var(--app-border);
}

.d-flex.justify-content-between.align-items-center.mb-4,
.d-flex.justify-content-between.mb-3,
.card-header .row {
    gap: 12px;
    padding: 16px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow-sm);
}

.card-header .row {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: var(--app-border-strong);
    border-radius: 10px;
    color: var(--app-text);
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.input-group .form-control,
.input-group .form-select {
    border-radius: 10px;
}

.btn {
    border-radius: 10px;
    font-weight: 700;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-width: 1px;
    box-shadow: none !important;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12) !important;
}

.btn-sm {
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 8px;
}

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

.btn-primary:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.btn-success {
    background: var(--app-success);
    border-color: var(--app-success);
}

.btn-danger {
    background: var(--app-danger);
    border-color: var(--app-danger);
}

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #111827;
}

.btn-info {
    background: var(--app-info);
    border-color: var(--app-info);
    color: #fff;
}

.btn-secondary,
.btn-outline-secondary {
    background: #fff;
    border-color: var(--app-border-strong);
    color: #475569;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

.table-responsive {
    overflow: auto;
}

.table {
    margin: 0;
    vertical-align: middle;
    color: var(--app-text);
}

.table > :not(caption) > * > * {
    padding: 13px 14px;
    border-bottom-color: var(--app-border);
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    white-space: nowrap;
    border-bottom: 1px solid var(--app-border);
}

.table-bordered > :not(caption) > * {
    border-width: 0;
}

.list-row-divider-table {
    border-collapse: collapse;
    border: 0;
}

.list-row-divider-table > :not(caption) > * > * {
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--app-border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: #fff;
}

.table-hover > tbody > tr:hover > *,
.table-striped > tbody > tr:hover > * {
    background: #f8fbff;
}

.table tbody tr.row-selected > * {
    background: #eff6ff !important;
}

.table td {
    max-width: 420px;
}

.table td:nth-child(3),
.table td:nth-child(4) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--app-primary);
}

.pagination {
    gap: 6px;
    flex-wrap: nowrap;
}

.page-link {
    border-radius: 9px !important;
    border-color: var(--app-border);
    color: #475569;
    min-width: 36px;
    text-align: center;
    white-space: nowrap;
    word-break: keep-all;
}

.page-item.active .page-link {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.alert {
    border: 0;
    border-radius: 12px;
    box-shadow: var(--app-shadow-sm);
}

.modal-content {
    overflow: hidden;
}

.modal-header,
.modal-footer {
    border-color: var(--app-border);
    background: #fff;
}

.modal-title {
    font-weight: 800;
}

.breadcrumb {
    margin: 0;
}

.text-right,
.float-sm-right {
    text-align: right;
}

.input-group-append {
    display: flex;
}

.input-group-append .btn {
    border-radius: 10px;
}

.mr-2 {
    margin-right: .5rem !important;
}

.content-wrapper {
    margin: 0;
}

.content-header {
    margin-bottom: 16px;
}

.content-header .container-fluid,
.content .container-fluid {
    padding: 0;
}

.content-header .row {
    align-items: center;
}

.page-shell {
    max-width: 1440px;
    margin: 0 auto;
}

.home-shell {
    padding: 24px clamp(20px, 2.6vw, 36px);
    width: 100%;
}

body.has-fixed-viewport-page .main-content > .home-shell {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: max(36px, env(safe-area-inset-bottom));
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.has-fixed-viewport-page .main-content > .home-shell::-webkit-scrollbar {
    display: none;
}

.home-module-section + .home-module-section {
    margin-top: 26px;
}

.home-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-section-heading h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.dashboard-board {
    margin-bottom: 22px;
}
.gantt-board{margin:16px 0;background:var(--app-surface);border:1px solid var(--app-border);border-radius:8px;overflow:hidden}.gantt-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--app-border)}.gantt-scroll{overflow:auto;max-height:360px}.gantt-grid{--gantt-person-width:150px;min-width:900px}.gantt-head,.gantt-row{display:grid;grid-template-columns:var(--gantt-person-width) 1fr}.gantt-head{position:sticky;top:0;z-index:5;background:#f8fafc}.gantt-person-head,.gantt-person{position:sticky;left:0;z-index:4;background:var(--app-surface);padding:9px 12px;border-right:1px solid var(--app-border)}.gantt-person{min-height:56px;font-weight:600}.gantt-person small{display:block;color:var(--app-muted);font-size:11px}.gantt-day,.gantt-cell{min-width:34px;border-right:1px solid var(--app-border);border-bottom:1px solid var(--app-border);text-align:center;font-size:11px;padding:8px 2px}.gantt-head>div:nth-child(n+2),.gantt-cells{display:grid;grid-template-columns:repeat(var(--gantt-days),minmax(34px,1fr))}.gantt-cells{position:relative;min-height:56px}.gantt-cell{grid-row:1}.gantt-day.weekend,.gantt-cell.weekend{background:#f1f5f9}.gantt-task{position:absolute;height:21px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:5px;padding:1px 6px;color:#fff;font-size:11px;text-align:left;z-index:2}.gantt-task.native{background:#2563eb}.gantt-task.plan{background:#64748b}.gantt-task.status-已完成{background:#10b981}.gantt-task.status-已延期{background:#ef4444}.gantt-task.status-已阻塞{background:#f59e0b}.gantt-legend{display:flex;gap:16px;padding:7px 16px;color:var(--app-muted);font-size:12px}.gantt-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}.gantt-dot.native{background:#2563eb}.gantt-dot.plan{background:#64748b}.gantt-detail-action{display:none}.gantt-board:fullscreen{background:var(--app-surface);padding:16px}.gantt-board:fullscreen .gantt-scroll{max-height:calc(100vh - 120px)}.gantt-board:fullscreen .gantt-detail-action{display:inline-flex}
.gantt-day.today,.gantt-cell.today{border-left:2px solid #ef4444}
.gantt-task.status-未开始{background-color:#6b7280}.gantt-task.status-进行中{background-color:#3b82f6}.gantt-toolbar-actions>[data-gantt-month]{width:132px}.gantt-board:fullscreen .gantt-legend,.gantt-board.gantt-maximized .gantt-legend{position:sticky;bottom:0;z-index:6;background:rgba(255,255,255,.94)}
.gantt-task.selected{outline:3px solid #111827;outline-offset:1px}
.gantt-toolbar-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.gantt-toolbar-actions>[data-gantt-person]{width:145px}.gantt-toolbar-actions select{width:130px}.gantt-task{--task-progress:0%;background-image:linear-gradient(90deg,rgba(0,0,0,.18) 0 var(--task-progress),transparent var(--task-progress))}.gantt-task span{position:relative;z-index:2}.gantt-resize{display:none;position:absolute;top:0;bottom:0;width:6px;z-index:3;cursor:ew-resize}.gantt-resize.left{left:0}.gantt-resize.right{right:0}.gantt-board:fullscreen .gantt-resize,.gantt-board.gantt-maximized .gantt-resize{display:block}.gantt-board.gantt-maximized{position:fixed;inset:0;z-index:2000;margin:0;border-radius:0;background:var(--app-surface);padding:16px}.gantt-board.gantt-maximized .gantt-scroll{max-height:calc(100vh - 130px)}.gantt-board.gantt-maximized .gantt-detail-action{display:inline-flex}.gantt-person em{display:inline-block;margin-left:6px;color:#94a3b8;font-size:10px;font-style:normal}.gantt-tag-checks{display:flex;gap:8px 16px;flex-wrap:wrap;padding:8px;border:1px solid var(--app-border);border-radius:6px;min-height:42px}.gantt-list-toolbar .form-control,.gantt-list-toolbar .form-select{width:auto;min-width:125px;flex:0 1 180px}.gantt-list-toolbar input[type="date"]{flex-basis:145px}.gantt-list-toolbar input[type="search"]{flex-basis:220px}

/* Gantt work board uses the sidebar palette while remaining isolated from the rest of the app. */
.gantt-board{--gantt-header:var(--app-sidebar);--gantt-body:#0a1020;--gantt-grid-line:#26344a;--gantt-cell-width:96px;--gantt-person-width:120px;width:100%;max-width:100%;min-width:0;margin:22px 0 22px;background:var(--gantt-body);border-color:#26344a;color:#e5e7eb;overflow:visible;scroll-margin-top:12px}
.gantt-board[data-gantt-view="week"]{--gantt-cell-width:96px}
.gantt-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:5px;min-width:0;max-width:100%;padding:10px;background:var(--gantt-header);border-bottom-color:var(--gantt-grid-line);white-space:nowrap;overflow:visible;position:sticky;top:0;z-index:20}
.gantt-title{flex:0 0 var(--gantt-person-width,160px);width:var(--gantt-person-width,160px);color:#fff;font-size:13px}
.gantt-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex:1 1 auto;min-width:0;flex-wrap:nowrap;margin-left:auto}
.gantt-toolbar-actions>.gantt-nav-group{margin-right:0}
.gantt-toolbar-actions .btn,.gantt-fullscreen-button{height:30px;padding:3px 7px;white-space:nowrap;font-size:12px}
.gantt-toolbar-actions>.btn-group .btn{padding-inline:8px}
.gantt-toolbar-actions>[data-gantt-person]{width:72px;min-width:72px;flex:0 0 72px}
.gantt-toolbar-actions>[data-gantt-status]{width:84px;min-width:76px;flex:0 1 84px}
.gantt-toolbar-actions>[data-gantt-priority]{width:94px;min-width:86px;flex:0 1 94px}
.gantt-toolbar-actions>[data-gantt-project]{width:88px;min-width:78px;flex:0 1 88px}
.gantt-toolbar-actions>[data-gantt-iteration]{width:88px;min-width:78px;flex:0 1 88px}
.gantt-toolbar-actions>select[data-gantt-status]+.project-search-select{width:95px;min-width:95px;flex:0 0 95px}
.gantt-toolbar-actions>select[data-gantt-priority]+.project-search-select{width:109px;min-width:109px;flex:0 0 109px}
.gantt-toolbar-actions>select[data-gantt-project]+.project-search-select,.gantt-toolbar-actions>select[data-gantt-iteration]+.project-search-select{width:95px;min-width:95px;flex:0 0 95px}
.gantt-toolbar .form-control,.gantt-toolbar .form-select{height:30px;padding-block:3px;border-color:#33445d;background:#111c2d;color:#dbe7f5;font-size:11px}
.gantt-toolbar .project-search-select-toggle{height:30px;padding:3px 7px;border-color:#33445d;background:#111c2d;color:#dbe7f5;font-size:11px}
.gantt-toolbar .project-search-select-label{min-width:0}
.gantt-toolbar-actions>[data-gantt-prev],.gantt-toolbar-actions>[data-gantt-next]{width:26px;padding-inline:0}
.gantt-toolbar-actions>[data-gantt-today]{width:34px;padding-inline:0}
.gantt-toolbar-actions>.btn-group .btn{width:24px;padding-inline:0}
.gantt-nav-group{display:inline-flex;align-items:center;gap:0;flex:0 0 auto;border:1px solid #3b4d68;border-radius:6px;overflow:hidden}.gantt-nav-group>.btn,.gantt-nav-group .btn{border:0;border-radius:0;height:30px}.gantt-nav-group .gantt-view-group{border-right:1px solid #3b4d68}.gantt-nav-group [data-gantt-prev],.gantt-nav-group [data-gantt-next]{width:28px;padding-inline:0}.gantt-nav-group [data-gantt-today]{min-width:46px;padding-inline:8px}
.gantt-toolbar .form-control::placeholder{color:#8493a8}
.gantt-toolbar .btn-outline-secondary{border-color:#3b4d68;color:#dbe7f5}
.gantt-toolbar .btn-outline-secondary:hover,.gantt-toolbar .btn-outline-secondary.active{background:#2563eb;border-color:#2563eb;color:#fff}
.gantt-range-label{flex:0 0 auto;color:#9fb7d4;font-size:10px;padding:0}
.gantt-fullscreen-button{flex:0 0 30px;width:30px;padding:0;margin-left:auto;display:inline-flex;align-items:center;justify-content:center}
.gantt-scroll{max-height:360px;overflow:auto;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain;cursor:grab}
.gantt-scroll::-webkit-scrollbar{display:none}
.gantt-board.is-panning .gantt-scroll{cursor:grabbing;user-select:none}
.gantt-grid{--gantt-person-width:120px;min-width:0;width:calc(var(--gantt-person-width) + var(--gantt-days) * var(--gantt-cell-width));background:var(--gantt-body)}
.gantt-head,.gantt-row{display:grid;grid-template-columns:var(--gantt-person-width) calc(var(--gantt-days) * var(--gantt-cell-width));width:100%}
.gantt-head{position:sticky;top:0;z-index:8;background:var(--gantt-header)}
.gantt-time-head{display:block;min-width:0;height:48px}
.gantt-date-head,.gantt-cells{display:grid;grid-template-columns:repeat(var(--gantt-days),var(--gantt-cell-width))}
.gantt-date-head{height:48px;border-bottom:1px solid var(--gantt-grid-line)}
.gantt-person-head,.gantt-person{position:sticky;left:0;z-index:7;background:var(--gantt-header);border-right:1px solid var(--gantt-grid-line);color:#f1f5f9}
.gantt-person-head{display:flex;align-items:center;height:48px;min-height:48px;padding:0 12px;border-bottom:1px solid var(--gantt-grid-line)}
.gantt-person{padding:9px 12px;min-height:56px;font-weight:600}
.gantt-person small{color:#8394aa}
.gantt-day,.gantt-cell{width:var(--gantt-cell-width);min-width:var(--gantt-cell-width);color:#cad7e7;text-align:center}.gantt-day{border:0}.gantt-cell{border-right:1px solid var(--gantt-grid-line);border-bottom:1px solid var(--gantt-grid-line)}
.gantt-day{display:flex;align-items:center;justify-content:center;gap:5px;padding:0 3px;font-size:11px}
.gantt-day span{color:#8da0b8}.gantt-day strong{font-size:12px;color:#f3f7fc}
.gantt-cells{position:relative;min-height:56px;background:var(--gantt-body)}
.gantt-cell{grid-row:1;padding:0;background:#0a1020}
.gantt-day.weekend{background:#111b2b}.gantt-cell.weekend{background:#080d18}
.gantt-cell.range-selected{background:rgba(59,130,246,.28);box-shadow:inset 0 0 0 1px rgba(96,165,250,.65)}
.gantt-task{box-shadow:0 2px 4px rgba(0,0,0,.35)}
.gantt-task.selected{outline:2px solid #fff;outline-offset:2px;box-shadow:0 0 0 3px #2563eb}
.gantt-detail-action{display:none}
.gantt-board:fullscreen,.gantt-board.gantt-maximized{box-sizing:border-box;display:flex;flex-direction:column;height:100vh;margin:0;padding:0;border:0;border-radius:0;background:var(--gantt-body)}
.gantt-board:fullscreen .gantt-toolbar,.gantt-board.gantt-maximized .gantt-toolbar{flex:0 0 auto}
.gantt-board:fullscreen .gantt-scroll,.gantt-board.gantt-maximized .gantt-scroll{flex:1 1 auto;min-height:0;max-height:none}
.gantt-board:fullscreen .gantt-detail-action,.gantt-board.gantt-maximized .gantt-detail-action{display:inline-flex}
.gantt-board:fullscreen .gantt-fullscreen-button,.gantt-board.gantt-maximized .gantt-fullscreen-button{display:none}

.gantt-editor-modal .modal-dialog{max-width:520px}
.gantt-editor-content{background:#1b3049;border:1px solid #31506f;color:#dbe7f5;box-shadow:0 24px 70px rgba(0,0,0,.45)}
.gantt-editor-content .modal-header,.gantt-editor-content .modal-footer{background:#1b3049;border-color:#31506f}
.gantt-editor-content .modal-title{color:#fff;font-size:18px}
.gantt-editor-content .btn-close{filter:invert(1) grayscale(1);opacity:.8}
.gantt-editor-content .form-label{margin-bottom:5px;color:#aebed1;font-size:13px}
.gantt-editor-content .form-control,.gantt-editor-content .form-select{background:#0d1b2a;border-color:#294866;color:#eef5ff}
.gantt-editor-content .project-search-select-toggle{background:#0d1b2a;border-color:#294866;color:#eef5ff}
.gantt-editor-content .project-search-select-menu{background:#13243a;border-color:#31506f;color:#dbe7f5}
.gantt-editor-content .project-search-select-option{color:#dbe7f5}
.gantt-editor-content .project-search-select-option:hover,.gantt-editor-content .project-search-select-option.active{background:#244566;color:#fff}
.gantt-board .project-search-select-toggle,.gantt-board .form-select,.gantt-board select{background:#111c2d!important;border-color:#33445d;color:#dbe7f5}.gantt-board .project-search-select-menu{background:#13243a;border-color:#31506f}.gantt-board .project-search-select-option{color:#dbe7f5}
.gantt-editor-content .form-control::placeholder{color:#6f8198}
.gantt-editor-content .btn-link{color:#8fbdff;text-decoration:none}
.gantt-status-options{display:flex;gap:8px;flex-wrap:wrap}
.gantt-status-option{border:1px solid transparent;border-radius:16px;padding:5px 13px;color:#fff;opacity:.62;transition:opacity .15s,box-shadow .15s,transform .15s}
.gantt-status-option:hover,.gantt-status-option.active{opacity:1;box-shadow:0 0 0 2px rgba(255,255,255,.7);transform:translateY(-1px)}
.gantt-status-option.status-secondary{background:#64748b}.gantt-status-option.status-primary{background:#3b82f6}.gantt-status-option.status-success{background:#10b981}.gantt-status-option.status-danger{background:#ef4444}.gantt-status-option.status-warning{background:#f59e0b;color:#111827}
.gantt-editor-content .gantt-tag-checks{gap:7px;padding:0;border:0}
.gantt-tag-option input{position:absolute;opacity:0;pointer-events:none}.gantt-tag-option span{display:inline-flex;align-items:center;min-height:28px;padding:3px 12px;border:1px solid #31557b;border-radius:15px;color:#aac0d9;cursor:pointer}.gantt-tag-option input:checked+span{background:#2563eb;border-color:#60a5fa;color:#fff}.gantt-tag-option input:disabled+span{opacity:.45;cursor:not-allowed}
.gantt-progress-editor{display:block}.gantt-progress-editor input[type="range"]{--progress:0%;background:linear-gradient(90deg,#3b82f6 0 var(--progress),#30465f var(--progress) 100%);border-radius:999px;height:7px;accent-color:#3b82f6}.gantt-progress-editor input[type="range"]::-webkit-slider-runnable-track{height:7px;background:transparent;border-radius:999px}.gantt-progress-editor input[type="range"]::-moz-range-track{height:7px;background:transparent;border-radius:999px}.gantt-progress-editor input[type="range"]::-webkit-slider-thumb{margin-top:-4px}
@media(max-width:1100px){.gantt-toolbar{flex-direction:row;gap:5px;padding-inline:7px}.gantt-toolbar-actions{gap:3px;justify-content:flex-start}.gantt-title{font-size:14px}.gantt-toolbar-actions>[data-gantt-person]{width:82px;min-width:72px}.gantt-range-label{font-size:10px}.gantt-toolbar-actions .btn,.gantt-fullscreen-button{padding-inline:5px}}

/* Final gantt overrides: keep controls readable and menus above the board. */
.gantt-toolbar-actions>[data-gantt-person]{width:108px;min-width:108px;flex:0 0 108px}
.gantt-range-label+[data-gantt-person]{margin-left:auto}
.gantt-toolbar-actions>select[data-gantt-status]+.project-search-select{width:108px;min-width:108px;flex:0 0 108px}
.gantt-toolbar-actions>select[data-gantt-priority]+.project-search-select{width:116px;min-width:116px;flex:0 0 116px}
.gantt-toolbar-actions>select[data-gantt-project]+.project-search-select,.gantt-toolbar-actions>select[data-gantt-iteration]+.project-search-select{width:108px;min-width:108px;flex:0 0 108px}
.gantt-toolbar-actions .project-search-select-label{flex:1 1 auto;min-width:max-content;overflow:visible;text-overflow:clip;white-space:nowrap;font-size:11px}
.gantt-toolbar-actions .form-select{font-size:11px;padding-right:22px}
.gantt-board .project-search-select-toggle,.gantt-board .form-select,.gantt-board select{background:#111c2d!important;color:#dbe7f5!important;border-color:#33445d!important}
.gantt-board .project-search-select-menu{z-index:4000;background:#111c2d!important;border-color:#33445d!important;color:#dbe7f5!important}
.gantt-board .project-search-select-option{color:#dbe7f5!important}
.gantt-board .project-search-select-option:hover,.gantt-board .project-search-select-option.active{background:#243b5a!important;color:#fff!important}
.gantt-editor-modal .modal-dialog{max-width:440px;margin:1.25rem auto}
.gantt-editor-modal .modal-body{padding:14px 18px}.gantt-editor-modal .modal-footer{padding:10px 18px}
.gantt-board select,.gantt-editor-content select,.gantt-editor-content .form-select{color-scheme:dark;background:#111c2d!important;color:#dbe7f5!important}
.gantt-board option,.gantt-editor-content option{background:#111c2d;color:#dbe7f5}
.gantt-board .gantt-day.today,.gantt-board .gantt-cell.today{border-left:0}

.dashboard-toolbar,
.dashboard-panel,
.summary-tile {
    border: 1px solid var(--app-border);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px 14px 0 0;
}

.dashboard-toolbar h4 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 900;
}

.dashboard-toolbar p,
.panel-heading span,
.dashboard-meta,
.summary-tile small,
.recent-item span {
    color: var(--app-muted);
}

.dashboard-toolbar p {
    margin: 0;
}

.dashboard-actions,
.refresh-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-control span {
    white-space: nowrap;
    font-weight: 800;
    color: #475569;
}

.refresh-control .form-select {
    width: 116px;
}

.dashboard-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-top: 0;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    padding: 14px 0;
}

.summary-tile {
    width: 100%;
    min-height: 92px;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--app-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.summary-tile:focus {
    outline: none;
}

.summary-tile:focus-visible {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .16), var(--app-shadow-sm);
}

.summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.summary-icon.bg-blue { background: #2563eb; }
.summary-icon.bg-teal { background: #0f766e; }
.summary-icon.bg-amber { background: #d97706; }
.summary-icon.bg-red { background: #dc2626; }
.summary-icon.bg-violet { background: #7c3aed; }
.summary-icon.bg-slate { background: #475569; }
.summary-icon.bg-green { background: #16a34a; }

.summary-tile small {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
}

.summary-tile strong {
    font-size: 26px;
    line-height: 1;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 14px;
}

.dashboard-panel {
    border-radius: 14px;
    padding: 18px;
    min-height: 268px;
}

.dashboard-panel.wide {
    grid-row: span 2;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-heading h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
}

.panel-heading span {
    font-size: 12px;
    text-align: right;
}

.donut-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        conic-gradient(
            #059669 0 calc(var(--pass) * 1%),
            #dc2626 calc(var(--pass) * 1%) calc(var(--fail) * 1%),
            #d97706 calc(var(--fail) * 1%) calc(var(--blocked) * 1%),
            #94a3b8 calc(var(--blocked) * 1%) 100%
        );
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: #fff;
}

.donut-chart span {
    position: relative;
    z-index: 1;
    font-size: 30px;
    font-weight: 900;
}

.chart-legend,
.status-bars,
.project-bars,
.recent-list {
    display: grid;
    gap: 12px;
}

.legend-item {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-row-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 800;
}

.status-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.status-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0f766e);
    min-width: 2px;
}

.project-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) auto;
    align-items: center;
    gap: 12px;
}

.project-name,
.recent-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-bars {
    display: grid;
    gap: 4px;
}

.mini-bar {
    display: block;
    height: 7px;
    border-radius: 999px;
}

.mini-bar.case { background: #2563eb; }
.mini-bar.plan { background: #0f766e; }
.mini-bar.report { background: #7c3aed; }
.mini-bar.knowledge { background: #d97706; }

.project-total {
    color: #475569;
    font-weight: 800;
    white-space: nowrap;
}

.recent-item {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--app-border);
}

.recent-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--app-muted);
    background: #f8fafc;
    border-radius: 10px;
}

.dashboard-page {
    max-width: none;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid var(--app-border);
    border-radius: 14px 14px 0 0;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(15, 118, 110, .07)),
        #fff;
    box-shadow: var(--app-shadow-sm);
}

.dashboard-hero h3 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 900;
}

.dashboard-hero p {
    margin: 0;
    color: var(--app-muted);
}

.dashboard-summary-grid.compact {
    grid-template-columns: repeat(4, minmax(118px, 1fr));
    padding: 16px 0;
}

.dashboard-summary-grid.compact .summary-tile {
    color: var(--app-text);
    text-decoration: none;
    min-width: 0;
    padding: 14px 12px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.dashboard-summary-grid.compact .summary-tile:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: var(--app-shadow);
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(520px, 1.35fr) minmax(520px, 1fr);
    gap: 16px;
    align-items: stretch;
}

.plan-progress-panel {
    min-height: 620px;
    height: 620px;
}

.dashboard-side-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    height: 620px;
    min-height: 620px;
    align-items: stretch;
}

.dashboard-side-stack > .dashboard-panel {
    min-height: 620px;
    height: 620px;
}

.dashboard-side-stack .recent-report-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dashboard-side-stack .recent-report-panel .recent-list {
    align-content: start;
    flex: 1;
    min-height: 0;
}

.project-overview-list,
.plan-progress-list {
    display: grid;
    gap: 14px;
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
}

.project-overview-card {
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.project-overview-head,
.plan-progress-top,
.plan-progress-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.project-overview-head {
    align-items: center;
    margin-bottom: 12px;
}

.project-overview-head strong,
.plan-progress-top strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-overview-head span,
.plan-progress-top span,
.plan-progress-bottom {
    color: var(--app-muted);
    font-size: 12px;
}

.project-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.project-metric-grid div {
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.project-metric-grid .metric-case {
    border-color: rgba(37, 99, 235, .24);
    background: #eff6ff;
}

.project-metric-grid .metric-plan {
    border-color: rgba(15, 118, 110, .24);
    background: #ecfdf5;
}

.project-metric-grid .metric-report {
    border-color: rgba(124, 58, 237, .22);
    background: #f5f3ff;
}

.project-metric-grid .metric-knowledge {
    border-color: rgba(217, 119, 6, .24);
    background: #fffbeb;
}

.project-metric-grid .metric-defect {
    border-color: rgba(220, 38, 38, .22);
    background: #fef2f2;
}

.project-metric-grid small {
    display: block;
    color: var(--app-muted);
    margin-bottom: 2px;
    font-weight: 800;
}

.project-metric-grid b {
    font-size: 18px;
}

.stacked-meter {
    display: flex;
    gap: 3px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.stacked-meter span {
    min-width: 2px;
}

.stacked-meter .case { background: #2563eb; }
.stacked-meter .plan { background: #0f766e; }
.stacked-meter .report { background: #7c3aed; }
.stacked-meter .knowledge { background: #d97706; }
.stacked-meter .defect { background: #dc2626; }

.plan-progress-card {
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
}

.dashboard-clickable-record {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dashboard-clickable-record:hover,
.dashboard-clickable-record:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .1);
    outline: none;
}

.plan-progress-top {
    align-items: flex-start;
    margin-bottom: 12px;
}

.plan-progress-top b {
    font-size: 22px;
    color: var(--app-primary);
}

.progress-track {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0f766e);
}

.progress-meta {
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 900;
    white-space: nowrap;
}

.progress-meta.executed {
    color: #1d4ed8;
    background: #eff6ff;
}

.progress-meta.total {
    color: #0f766e;
    background: #ecfdf5;
}

.progress-meta.status {
    color: #92400e;
    background: #fffbeb;
}

.progress-meta.defect {
    color: #b91c1c;
    background: #fef2f2;
}

.defect-overview-panel {
    margin-top: 28px;
}

.defect-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.defect-chart-block {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    min-height: 292px;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
}

.breakdown-title {
    margin-bottom: 8px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 900;
}

.pie-legend-item {
    width: 100%;
    grid-template-columns: 10px minmax(0, 1fr) 58px;
    column-gap: 10px;
}

.pie-legend-item strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 58px;
}

.severity-legend-item {
    display: inline-grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 6px;
    min-width: 96px;
}

.severity-legend-item strong {
    margin-left: 2px;
}

.defect-pie-layout {
    display: grid;
    grid-template-columns: minmax(200px, 32%) 1fr max-content;
    align-items: center;
    gap: 18px;
    height: 100%;
}

.defect-pie-layout .chart-legend {
    grid-column: 3;
    justify-self: end;
    min-width: 156px;
}

.defect-line-layout {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    height: 100%;
}

.defect-line-layout .chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 14px;
    padding: 0 8px;
}

.defect-pie-layout .chart-legend,
.status-pie-layout .chart-legend {
    align-content: center;
}

.defect-pie {
    width: 164px;
    height: 164px;
    justify-self: center;
    transform: translateX(34px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background: #e2e8f0;
}

.defect-pie::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
    pointer-events: none;
}

.pie-tooltip {
    position: absolute;
    z-index: 3;
    min-width: 96px;
    padding: 6px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
    background: rgba(15, 23, 42, .9);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
}

.pie-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.defect-line-chart {
    min-width: 0;
    align-self: stretch;
}

.defect-line-chart svg {
    display: block;
    width: 100%;
    height: 236px;
}

.line-axis {
    stroke: #94a3b8;
    stroke-width: 1;
}

.line-grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.severity-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.severity-bar {
    transition: opacity .15s ease, filter .15s ease;
}

.severity-bar:hover {
    opacity: .86;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, .16));
}

.line-value {
    fill: var(--app-text);
    font-size: 13px;
    font-weight: 900;
    text-anchor: middle;
}

.line-label {
    fill: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
    text-anchor: middle;
}

.line-y-label {
    fill: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
    text-anchor: end;
}

.status-pie-layout {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.status-pie {
    width: 138px;
    height: 138px;
    justify-self: end;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    position: relative;
}

.status-pie::after {
    display: none;
}

.status-pie span {
    display: none;
}

.status-pie .pie-tooltip {
    display: block;
}

.report-summary-panel {
    margin-top: 18px;
    padding: 0;
    overflow: visible;
}

.report-summary-toolbar,
.report-summary-filterbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.report-summary-toolbar {
    flex-wrap: nowrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--app-border);
}

.report-summary-filterbar {
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-left: auto;
    padding: 0;
    border-bottom: 0;
    background: transparent;
}

.report-summary-filter-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.report-date-range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 2px 8px;
    border: 1px solid var(--app-border-strong);
    border-radius: 6px;
    background: #fff;
    white-space: nowrap;
}

.report-summary-filterbar .form-label {
    white-space: nowrap;
}

.report-date-range input {
    width: 138px;
    height: 32px;
    border: 0;
    padding: 2px 0;
    color: var(--app-text);
    font-size: 13px;
    background: transparent;
}

.report-date-range input:focus {
    outline: 0;
    box-shadow: none;
}

.report-user-filter {
    display: flex;
    min-width: 168px;
}

.report-user-select {
    position: relative;
    width: 168px;
}

.report-user-select summary {
    list-style: none;
    cursor: pointer;
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--app-border-strong);
    border-radius: 6px;
    padding: 6px 30px 6px 10px;
    color: var(--app-text);
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.report-user-select summary::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: translateY(-65%) rotate(45deg);
}

.report-user-select summary::-webkit-details-marker {
    display: none;
}

.report-user-menu {
    position: absolute;
    right: 0;
    z-index: 24;
    width: 100%;
    min-width: 168px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.report-user-menu .form-control {
    height: 38px;
    border-color: #60a5fa;
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.report-user-options {
    display: grid;
    gap: 0;
    max-height: 210px;
    margin-top: 6px;
    overflow: auto;
}

.report-user-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 5px 2px;
    border-radius: 4px;
    color: var(--app-text);
    font-size: 14px;
    font-weight: 400;
}

.report-user-option:hover {
    background: #f8fafc;
}

.report-user-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid #cbd5e1;
}

.report-user-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-user-name {
    color: #334155;
}

.report-user-email {
    display: none;
}

.report-summary-hours {
    margin-left: 4px;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
}

.report-summary-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 4px 10px;
    white-space: nowrap;
}

.report-summary-copy-btn[hidden] {
    display: none !important;
}

.report-summary-table-section {
    --report-summary-scrollbar-width: 0px;
    --report-summary-col-owner: 8%;
    --report-summary-col-project: 10%;
    --report-summary-col-iteration: 12%;
    --report-summary-col-current: 26%;
    --report-summary-col-next: 23%;
    --report-summary-col-support: 18%;
    --report-summary-col-progress: 10%;
    --report-summary-col-hours: 5%;
}

.report-summary-table-head-wrap {
    overflow: hidden;
    padding-right: var(--report-summary-scrollbar-width);
    background: var(--app-surface-soft);
}

.report-summary-table-wrap {
    max-height: 440px;
    overflow: auto;
}

.report-summary-table-head-wrap,
.report-summary-table-wrap {
    border: 1px solid var(--app-border);
    background: #fff;
}

.report-summary-table-head-wrap {
    border-width: 0 0 1px;
}

.report-summary-table-wrap {
    border-width: 0;
}

.report-summary-table {
    width: 100%;
    min-width: 1060px;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.report-summary-table th {
    padding: 10px 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    background: var(--app-surface-soft);
    border: 0;
    border-bottom: 1px solid var(--app-border);
}

.report-summary-table td {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    vertical-align: top;
    color: var(--app-text);
    font-size: 13px;
    background: #fff;
}

.report-summary-table .report-summary-owner-cell {
    border-bottom: 1px solid var(--app-border);
}

.report-summary-table .report-summary-project-cell {
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none;
    background-image: none !important;
}

.report-summary-table .report-summary-project-cell.project-border-visible {
    border-top: 1px solid var(--app-border) !important;
    border-bottom: 0 !important;
    box-shadow: none;
    background-image: none !important;
}

.report-summary-filterbar.is-project-mode label,
.report-summary-filterbar.is-project-mode .report-date-range,
.report-summary-filterbar.is-project-mode .report-user-filter,
.report-summary-filterbar.is-project-mode #reportSummaryFilterBtn,
.report-summary-filterbar.is-project-mode #reportSummaryResetBtn {
    display: none;
}

.report-summary-table-section.is-project-mode {
    --report-summary-col-project: 10%;
    --report-summary-col-iteration: 10%;
    --report-summary-col-current: 41%;
    --report-summary-col-support: 20%;
    --report-summary-col-progress: 11%;
    --report-summary-col-hours: 8%;
}

.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(1),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(1) { width: var(--report-summary-col-project); }
.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(2),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(2) { width: var(--report-summary-col-iteration); }
.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(3),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(3) { width: var(--report-summary-col-current); }
.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(4),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(4) { width: var(--report-summary-col-support); }
.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(5),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(5) { width: var(--report-summary-col-progress); }
.report-summary-table-section.is-project-mode .report-summary-table th:nth-child(6),
.report-summary-table-section.is-project-mode .report-summary-table td:nth-child(6) { width: var(--report-summary-col-hours); }

.report-summary-table-section.is-project-mode .report-summary-iteration-cell,
.report-summary-table-section.is-project-mode .report-summary-project-cell {
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.report-summary-table-section.is-project-mode .report-summary-project-cell.project-border-visible,
.report-summary-table-section.is-project-mode .report-summary-iteration-cell.project-border-visible,
.report-summary-table-section.is-project-mode .report-summary-iteration-cell.iteration-border-visible {
    border-top: 1px solid var(--app-border) !important;
}

.report-summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.report-summary-table th:nth-child(1),
.report-summary-table td:nth-child(1) { width: var(--report-summary-col-owner); }
.report-summary-table th:nth-child(2),
.report-summary-table td:nth-child(2) { width: var(--report-summary-col-project); }
.report-summary-table th:nth-child(3),
.report-summary-table td:nth-child(3) { width: var(--report-summary-col-current); }
.report-summary-table th:nth-child(4),
.report-summary-table td:nth-child(4) { width: var(--report-summary-col-next); }
.report-summary-table th:nth-child(5),
.report-summary-table td:nth-child(5) { width: var(--report-summary-col-support); }
.report-summary-table th:nth-child(6),
.report-summary-table td:nth-child(6) { width: var(--report-summary-col-progress); }
.report-summary-table th:nth-child(7),
.report-summary-table td:nth-child(7) { width: var(--report-summary-col-hours); }

.report-summary-table td:first-child strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-summary-group-cell {
    font-weight: 700;
}

.report-summary-table tbody tr:hover {
    background: #f8fafc;
}

.report-summary-text {
    max-height: 86px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
}

.report-summary-progress {
    flex: 1 1 auto;
    min-width: 74px;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 3px 0 5px;
}

.report-summary-progress-cell {
    white-space: nowrap;
}

.report-summary-progress-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.report-summary-progress-inline b {
    flex: 0 0 auto;
    min-width: 34px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.report-summary-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0f766e);
}

.workload-panel {
    margin-top: 18px;
}

.workload-heading-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.workload-heading-tools #workloadRange {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.workload-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: #f8fafc;
}

.workload-tabs button {
    border: 0;
    border-radius: 8px;
    padding: 6px 14px;
    color: var(--app-muted);
    font-weight: 900;
    background: transparent;
}

.workload-tabs button.active {
    color: #fff;
    background: var(--app-primary);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .18);
}

.workload-grid {
    display: block;
}

.workload-table-wrap {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
}

.workload-table-wrap {
    max-height: 318px;
    overflow: auto;
}

.workload-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.workload-table th,
.workload-table td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--app-border);
    text-align: center;
    white-space: nowrap;
}

.workload-table th {
    color: #475569;
    font-size: 12px;
    background: #f8fafc;
}

.workload-table td:first-child,
.workload-table th:first-child {
    text-align: left;
}

.workload-table tbody tr:hover {
    background: #f8fafc;
}

.workload-trend-card {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
}

.workload-trend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.workload-line-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.workload-line-legend button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 4px 8px;
    color: #475569;
    font: inherit;
    background: transparent;
    transition: background .15s ease, opacity .15s ease;
}

.workload-line-legend button.active {
    background: #f1f5f9;
}

.workload-line-legend button.muted {
    opacity: .38;
}

.workload-line-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.workload-line-chart {
    overflow-x: auto;
}

.workload-line-chart svg {
    display: block;
    width: 100%;
    min-width: 760px;
    height: 300px;
}

.workload-hover-zone {
    fill: transparent;
    pointer-events: all;
}

.auto-summary-panel {
    margin-top: 18px;
}

.performance-summary-panel {
    margin-top: 18px;
}

.auto-summary-list {
    display: grid;
    gap: 14px;
}

.auto-task-filter {
    display: flex;
    justify-content: flex-end;
}

.auto-task-select {
    position: relative;
}

.auto-task-select summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 7px 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    background: #f8fafc;
    user-select: none;
}

.auto-task-select summary::-webkit-details-marker {
    display: none;
}

.auto-task-menu {
    position: absolute;
    right: 0;
    z-index: 20;
    width: 280px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.auto-task-options {
    display: grid;
    gap: 4px;
    max-height: 220px;
    margin-top: 8px;
    overflow: auto;
}

.auto-task-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    color: var(--app-text);
    font-size: 12px;
    font-weight: 800;
}

.auto-task-option:hover {
    background: #f8fafc;
}

.auto-task-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-task-card {
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
}

.auto-task-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.auto-task-head strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--app-text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-run-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.line-rate-label {
    fill: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
    text-anchor: start;
}

.performance-bar-chart {
    min-width: 0;
}

.performance-bar {
    fill: #0f766e;
    transition: opacity .15s ease, filter .15s ease;
}

.performance-bar:hover {
    opacity: .86;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, .16));
}

.line-date-label {
    fill: var(--app-muted);
    font-size: 11px;
    font-weight: 800;
    text-anchor: middle;
}

.dashboard-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.dashboard-filter-group .form-select {
    width: 136px;
}

.dashboard-heading-filter {
    align-items: center;
    flex-wrap: nowrap;
}

.dashboard-heading-filter h5 {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .dashboard-heading-filter {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-filter-group {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.recent-report-panel .recent-list {
    max-height: none;
    overflow: auto;
    padding-right: 4px;
}

.table-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 8px;
    min-width: 130px;
}

.table-progress .progress-track {
    height: 8px;
    margin: 0;
}

.table-progress strong {
    font-size: 12px;
    color: var(--app-primary);
}

.table-progress small {
    grid-column: 1 / -1;
    color: var(--app-muted);
    font-weight: 800;
}

.detail-progress {
    padding: 12px;
    margin: 8px 0 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.detail-progress-wide {
    margin: 14px 0 0;
}

.detail-progress-head,
.detail-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.detail-progress-head {
    margin-bottom: 8px;
}

.detail-progress-head span {
    font-weight: 900;
    color: #1e40af;
}

.detail-progress-head strong {
    font-size: 24px;
    color: #0f766e;
}

.detail-progress .progress-track {
    height: 12px;
    margin-bottom: 8px;
    background: #dbeafe;
}

.detail-progress-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.plan-info-grid p,
.card-body .row p {
    margin-bottom: 8px;
}

.status-filter,
.executor-filter {
    position: relative;
}

.status-filter-menu,
.executor-filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1100;
    min-width: 150px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-sm);
}

.status-filter.open .status-filter-menu,
.executor-filter.open .executor-filter-menu {
    display: block;
}

.status-filter .form-check,
.executor-filter .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 800;
    color: #475569;
}

.status-filter .form-check:last-child,
.executor-filter .form-check:last-child {
    margin-bottom: 0;
}

.project-searchbar .btn {
    font-size: 13px;
    min-height: 36px;
    padding: 5px 12px;
    gap: 5px;
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 72px;
}

.project-searchbar {
    flex-wrap: nowrap;
    align-items: center;
}

.project-searchbar .form-control {
    min-width: 220px;
}

.list-search-group {
    width: 420px;
    flex-wrap: nowrap;
}

.list-search-group .form-control {
    min-width: 240px;
    flex: 1 1 auto;
}

.list-search-group .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.case-search-group {
    width: 680px;
}

.case-search-group .form-control {
    min-width: 200px;
}

.case-sort-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.module-sort-controls {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 0.75;
    vertical-align: middle;
}

.module-sort-btn {
    width: 12px;
    height: 9px;
    border: 0;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    padding: 0;
    opacity: 0.75;
}

.module-sort-btn i {
    display: block;
}

.module-sort-btn:hover,
.module-sort-btn.active {
    color: #0d6efd;
    opacity: 1;
}

.project-searchbar .btn span {
    display: inline-block;
    white-space: nowrap;
}

.project-searchbar .btn i {
    font-size: 14px;
    flex: 0 0 auto;
}

.recent-list .recent-item {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: #fff;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 280px));
    gap: clamp(14px, 1.3vw, 20px);
    justify-content: start;
    align-items: stretch;
}

.module-card {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 164px;
    padding: clamp(18px, 1.4vw, 22px);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    box-shadow: var(--app-shadow-sm);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: var(--app-shadow);
}

.module-card:focus {
    outline: none;
}

.module-card:focus-visible {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .16), var(--app-shadow-sm);
}

.module-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 12px;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

.module-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.module-card p {
    color: var(--app-muted);
    margin: 0;
    line-height: 1.6;
}

.list-page-shell {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.main-content > .container:has(.list-page-shell) {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

body.has-list-page .main-content > .container {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

.main-content > .container:has(.list-page-shell) > .row {
    height: 100%;
    min-height: 0;
}

body.has-list-page .main-content > .container > .row {
    height: 100%;
    min-height: 0;
}

.main-content > .container:has(.list-page-shell) .list-page-shell {
    height: 100%;
    max-height: 100%;
}

body.has-list-page .main-content > .container .list-page-shell {
    height: 100%;
    max-height: 100%;
}

.list-page-shell > h3,
.list-page-shell > .defect-list-toolbar,
.list-page-shell > .d-flex,
.list-page-shell > .alert,
.knowledge-list-page > .content-header,
.list-page-card > .card-header {
    flex: 0 0 auto;
}

.list-toolbar-card {
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-sm);
}

.list-page-form,
.list-page-content,
.list-page-card {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.list-page-content > .container-fluid {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0;
}

.list-table-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    margin-bottom: 0;
}

.list-table-scroll > table {
    margin-bottom: 0;
}

.list-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--app-border);
}

.list-page-footer {
    flex: 0 0 auto;
    padding-top: 10px;
    background: var(--app-bg);
}

.list-page-pagination {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.list-page-pagination .pagination {
    margin-bottom: 0;
}

.list-page-card {
    margin-bottom: 0;
    overflow: hidden;
}

.list-page-card .card-footer {
    background: #fff;
}

.plan-form-page,
.plan-execute-page {
    height: calc(100vh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 18px !important;
    padding-bottom: 14px;
}

.plan-execute-page {
    max-width: none;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

.plan-form-page {
    display: flex;
    flex-direction: column;
}

.plan-form-titlebar,
.plan-execute-page > .execute-summary-card {
    flex: 0 0 auto;
}

.plan-form-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.plan-form-titlebar h3 {
    margin: 0;
    font-size: 20px;
}

.plan-form-titlebar .btn {
    min-height: 34px;
    padding: 5px 14px;
    font-size: 13px;
}

.plan-form-page #planForm {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.plan-form-card {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 10px !important;
    overflow: hidden;
}

.plan-form-card .card-body {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 12px 16px;
}

.plan-form-card .row.mb-3 {
    margin-bottom: 8px !important;
}

.plan-basic-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(168px, 1fr) minmax(168px, 1fr);
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
}

.plan-basic-grid > div {
    min-width: 0;
}

@media (max-width: 1280px) {
    .plan-basic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .plan-basic-grid {
        grid-template-columns: 1fr;
    }
}

.plan-form-card .form-label {
    margin-bottom: 3px;
    font-size: 13px;
}

.plan-form-card .form-control,
.plan-form-card .form-select,
.plan-form-card .btn {
    font-size: 13px;
}

.plan-form-card .form-control,
.plan-form-card .form-select {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.executor-multi-select {
    position: relative;
}

.executor-multi-toggle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.executor-multi-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 3050;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.executor-multi-options {
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.executor-multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 8px;
    border-radius: 6px;
    color: #334155;
    cursor: pointer;
}

.executor-multi-option:hover {
    background: #f1f5f9;
}

.executor-multi-empty {
    padding: 10px 8px 4px;
    color: #64748b;
    text-align: center;
}

.plan-case-section {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 8px !important;
    padding-top: 8px !important;
}

.plan-case-section > .d-flex,
.plan-case-section #casePagination,
.plan-case-section > .d-flex.justify-content-center {
    flex: 0 0 auto;
}

.plan-case-section h5 {
    font-size: 16px;
}

.plan-selected-case-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    margin-left: 4px;
    padding: 0 7px;
    border-radius: 6px;
    background: #e8f0fe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.plan-case-table-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.plan-case-table-scroll table {
    margin-bottom: 0;
}

.plan-case-title-button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.plan-case-title-button:hover,
.plan-case-title-button:focus-visible {
    color: var(--app-primary);
    text-decoration: none;
}

.plan-case-detail-modal textarea[readonly] {
    resize: none;
}

.plan-case-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.plan-form-card .card-footer {
    flex: 0 0 auto;
    padding: 10px 16px;
}

.plan-execute-page {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
}

.execute-summary-card {
    min-height: 0;
    margin-bottom: 0 !important;
}

.execute-summary-card .card-header {
    padding: 7px 14px;
}

.execute-summary-card .card-header h3 {
    font-size: 18px;
}

.execute-summary-card .card-body {
    padding: 7px 14px 8px;
}

.execute-summary-card p {
    margin-bottom: 2px;
    font-size: 13px;
}

.execute-summary-card .detail-progress {
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: transparent;
}

.execute-summary-card .plan-info-grid {
    align-items: center;
}

.execute-summary-card .plan-info-grid > [class*="col-"] {
    display: grid;
    align-content: center;
}

.execute-summary-card .detail-progress .progress-track {
    height: 6px;
    margin-bottom: 3px;
}

.execute-summary-card .detail-progress-meta span {
    padding: 2px 6px;
    font-size: 12px;
}

.execute-status-progress {
    min-width: 0;
}

.execute-list-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 61px;
    box-sizing: border-box;
}

.execute-list-header h5,
.execute-detail-card .card-header h5 {
    min-width: 0;
    flex: 1 1 auto;
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.execute-list-header h5 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.execute-list-header h5::before {
    content: "";
    width: 8px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, #2563eb, #0f766e);
}

.execute-plan-title {
    font-weight: 700;
    color: var(--app-text-muted);
}

.execute-list-status {
    flex: 0 1 52%;
    min-width: 260px;
}

.execute-list-status .execute-status-line {
    margin-bottom: 2px;
    font-size: 12px;
}

.execute-list-status .execute-progress-value {
    font-size: 15px;
}

.execute-list-status .detail-progress {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.execute-list-status .detail-progress .progress-track {
    height: 5px;
    margin-bottom: 2px;
}

.execute-list-status .detail-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.execute-list-status .detail-progress-meta span {
    padding: 0;
    font-size: 11px;
}

.execute-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 13px;
}

.execute-progress-value {
    margin-left: auto;
    color: #0f766e;
    font-size: 18px;
    line-height: 1;
}

.execute-report-action .btn {
    min-height: 32px;
    padding: 5px 12px;
    font-size: 14px;
}

.execute-workspace-row {
    height: 100%;
    min-height: 0;
    margin-top: 0;
}

.execute-workspace-row > [class*="col-"] {
    height: 100%;
    min-height: 0;
    display: flex;
}

.execute-list-card,
.execute-detail-card {
    width: 100%;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.execute-list-card .card-header,
.execute-detail-card .card-header {
    flex: 0 0 auto;
    min-height: 61px;
    box-sizing: border-box;
    padding: 7px 10px;
}

.execute-list-card .card-header h5,
.execute-detail-card .card-header h5 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.execute-list-card .card-body,
.execute-detail-card .card-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    padding: 8px 10px;
}

.execute-detail-card .card-body {
    overflow-y: auto;
}

.execute-list-card #filterForm {
    flex: 0 0 auto;
    margin-bottom: 8px !important;
}

.execute-filter-row {
    gap: 6px !important;
}

.execute-filter-row .form-select,
.execute-filter-row .form-control,
.execute-filter-row .btn {
    min-height: 35px;
    font-size: 15px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.execute-case-table-scroll {
    min-height: 0;
    overflow: auto;
}

.execute-case-table-scroll table {
    margin-bottom: 0;
}

.execute-case-table-scroll tbody > tr:not(.table-active) > * {
    background: #fff !important;
}

.execute-case-table-scroll tbody > tr.table-active > * {
    background: #eff6ff !important;
}

.execute-case-table-scroll th:first-child,
.execute-case-table-scroll td:first-child {
    width: auto;
}

.execute-case-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.execute-list-card .pagination,
.plan-case-section .pagination {
    --bs-pagination-padding-x: .5rem;
    --bs-pagination-padding-y: .2rem;
    --bs-pagination-font-size: .78rem;
}

.execute-list-card .table,
.plan-case-section .table {
    font-size: 15px;
}

.execute-list-card .table > :not(caption) > * > * {
    padding: 8px 10px;
}

.execute-detail-card .form-label,
.execute-detail-card p,
.execute-detail-card textarea,
.execute-detail-card select {
    font-size: 14px;
}

.execute-detail-card p {
    margin-bottom: 0;
    line-height: 1.35;
}

.execute-detail-card hr {
    margin: 4px 0;
}

.execute-detail-card .card-header .btn {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 14px;
}

.execute-detail-card .mb-3 {
    margin-bottom: 6px !important;
}

.execute-detail-card .form-label {
    margin-bottom: 3px;
}

.execute-detail-card .form-select,
.execute-detail-card .form-control {
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.execute-detail-card textarea.form-control {
    min-height: 54px;
    line-height: 1.35;
}

.execute-detail-card input[type="file"].form-control {
    min-height: 32px;
    font-size: 14px;
}

.execute-detail-card #caseDetailContent {
    min-height: 100%;
    overflow: visible;
}

.execute-detail-card #caseDetailEmpty {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
}

.execute-detail-card #screenshotContainer {
    gap: 8px !important;
    max-height: 58px;
    overflow: hidden;
}

.execute-detail-card .screenshot-thumbnail {
    height: 46px !important;
    max-width: 76px !important;
}

.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.tools-text-page {
    padding-bottom: 12px !important;
}

.tools-text-page .tools-header {
    margin-bottom: 14px;
}

.tools-header h3 {
    margin-bottom: 8px;
}

.tools-header p {
    margin: 0;
    color: var(--app-muted);
}

.tool-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.tool-switcher > span {
    color: #475569;
    font-weight: 800;
    white-space: nowrap;
}

.tool-switch-menu {
    width: min(420px, calc(100vw - 32px));
    padding: 10px;
    border-radius: 12px;
}

.tool-search-input {
    margin-bottom: 8px;
}

.tool-option-list {
    max-height: 320px;
    overflow: auto;
}

.tool-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    white-space: normal;
}

.tool-option i {
    margin-top: 2px;
    color: var(--app-primary);
}

.tool-option span {
    min-width: 0;
}

.tool-option strong,
.tool-option small {
    display: block;
}

.tool-option small {
    margin-top: 3px;
    color: var(--app-muted);
    line-height: 1.4;
}

.tool-option.active,
.tool-option:active {
    background: var(--app-primary-soft);
    color: var(--app-text);
}

.tool-empty-tip {
    display: none;
    padding: 14px 8px 4px;
    color: var(--app-muted);
    text-align: center;
}

.tool-toast-wrap {
    position: fixed;
    top: calc(var(--topbar-height) + 14px);
    left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2);
    z-index: 3200;
    transform: translateX(-50%);
    pointer-events: none;
}

.tool-message-toast {
    min-width: 320px;
    max-width: min(560px, calc(100vw - 32px));
    border: 0;
    box-shadow: var(--app-shadow);
}

.tool-message-toast .toast-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-weight: 800;
}

.tool-toast-link {
    color: inherit;
    text-decoration: underline;
    white-space: nowrap;
    pointer-events: auto;
}

.tools-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.tools-layout.text-output {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    height: calc(100vh - var(--topbar-height) - 166px);
    min-height: 640px;
}

.tool-run-panel,
.tool-info-panel,
.tool-expected-panel {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.tool-run-panel {
    padding: 22px;
}

.tools-layout.text-output .tool-run-panel,
.tools-layout.text-output .tool-info-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tools-layout.text-output .tool-textarea-field {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.tool-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--app-border);
}

.tools-text-page .tool-panel-heading {
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.tools-text-page .form-text {
    margin-top: 4px;
    line-height: 1.35;
}

.tool-panel-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 22px;
}

.tool-panel-heading h4 {
    margin: 0 0 6px;
    font-size: 20px;
}

.tool-panel-heading p,
.tool-info-panel p {
    margin: 0;
    color: var(--app-muted);
    line-height: 1.6;
}

.tool-actions {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-top: 14px;
}

.tool-input-textarea {
    min-height: 520px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.55;
}

.tools-layout.text-output .tool-input-textarea {
    flex: 1 1 auto;
    min-height: 0;
}

.tool-expected-panel {
    padding: 18px;
    margin-bottom: 18px;
}

.tools-text-page .tool-expected-panel {
    padding: 14px 18px;
    margin-bottom: 18px;
}

.tool-expected-panel h5 {
    margin: 0 0 12px;
    font-size: 15px;
}

.tool-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tool-result-heading h5 {
    margin: 0;
    font-size: 16px;
}

.tool-result-text {
    min-height: 520px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.55;
    background: #f8fafc;
}

.tools-layout.text-output .tool-result-text {
    flex: 1 1 auto;
    min-height: 0;
}

.tool-info-panel {
    padding: 18px;
}

.tool-info-panel h5 {
    margin: 0 0 12px;
    font-size: 15px;
}

.tool-info-panel h5:not(:first-child) {
    margin-top: 20px;
}

.tool-input-list {
    display: grid;
    gap: 10px;
}

.tool-input-list.horizontal {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-input-list div {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-soft);
}

.tool-input-list strong,
.tool-input-list span {
    display: block;
}

.tool-input-list span {
    margin-top: 4px;
    color: var(--app-muted);
    line-height: 1.5;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .18), transparent 34%),
        radial-gradient(circle at 70% 72%, rgba(15, 118, 110, .18), transparent 30%),
        #eef4fb;
}

.login-visual {
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 900;
}

.login-copy {
    max-width: 620px;
}

.login-copy h1 {
    font-size: 42px;
    line-height: 1.16;
    margin-bottom: 16px;
}

.login-copy p {
    color: #475569;
    font-size: 16px;
    line-height: 1.8;
}

.login-panel {
    display: flex;
    align-items: center;
    padding: 36px;
    background: rgba(255, 255, 255, .86);
    border-left: 1px solid rgba(226, 232, 240, .9);
    backdrop-filter: blur(18px);
}

.login-card {
    width: 100%;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
}

.login-card h4 {
    margin-bottom: 6px;
}

.login-card .sub {
    color: var(--app-muted);
    margin-bottom: 24px;
}

.login-card label {
    font-weight: 800;
    color: #334155;
    margin-bottom: 7px;
}

.login-card .btn {
    min-height: 44px;
}

@media (max-width: 980px) {
    body.has-sidebar .sidebar-toggle {
        display: inline-flex;
        position: fixed;
        top: 13px;
        left: 12px;
        z-index: 1060;
    }

    .app-sidebar {
        transform: translateX(-104%);
        transition: transform .2s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: var(--topbar-height) 0 0;
        background: rgba(15, 23, 42, .44);
        z-index: 1025;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .content-with-sidebar,
    .main-content > .container,
    .main-content > .container-fluid,
    .main-content > .content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .topbar-link span,
    .user-name {
        display: none;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        border-left: 0;
    }
}

@media (max-width: 720px) {
    .app-topbar {
        padding: 0 12px;
    }

    .brand-text {
        font-size: 16px;
    }

    .content-with-sidebar,
    .main-content > .container,
    .main-content > .container-fluid,
    .main-content > .content-wrapper {
        padding: 14px;
    }

    .d-flex.justify-content-between.align-items-center.mb-4,
    .d-flex.justify-content-between.mb-3 {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-flex.align-items-center.gap-2,
    .d-flex.gap-3,
    .d-flex.justify-content-between.mb-3 > .d-flex,
    .d-flex.justify-content-between.mb-3 > div {
        flex-wrap: wrap;
        width: 100%;
    }

    .input-group,
    .form-select,
    .form-control {
        width: 100% !important;
    }

    .btn {
        white-space: nowrap;
    }

    .table-responsive,
    table {
        max-width: 100%;
    }

    .main-content {
        overflow-x: hidden;
    }

    .home-shell {
        padding: 16px;
    }

    .dashboard-toolbar,
    .dashboard-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions {
        flex-wrap: wrap;
    }

    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .tools-header,
    .tool-switcher {
        flex-direction: column;
        align-items: stretch;
    }

    .tools-layout {
        grid-template-columns: 1fr;
    }

    .tool-toast-wrap {
        left: 50%;
    }

    .tools-layout.text-output {
        height: auto;
        min-height: 0;
    }

    .tools-layout.text-output .tool-run-panel,
    .tools-layout.text-output .tool-info-panel {
        min-height: 520px;
    }

    .dashboard-summary-grid.compact,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .defect-chart-grid,
    .defect-pie-layout,
    .workload-grid {
        grid-template-columns: 1fr;
    }

    .defect-pie-layout .chart-legend {
        grid-column: auto;
        justify-self: stretch;
    }

    .defect-pie {
        justify-self: center;
        transform: none;
    }

    .project-overview-panel,
    .plan-progress-panel {
        min-height: auto;
    }

    .dashboard-side-stack {
        height: auto;
        min-height: auto;
    }

    .project-row {
        grid-template-columns: 1fr;
    }
}

/* Stable admin shell overrides */
@media (min-width: 981px) {
    body.plan-form-full-width .app-topbar {
        left: 0 !important;
        width: 100% !important;
    }

    body.plan-form-full-width .main-content > .container {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .app-sidebar {
        top: 0;
        width: var(--sidebar-width);
        padding: 18px 14px;
        box-shadow: 12px 0 34px rgba(15, 23, 42, 0.16);
    }

    .app-topbar {
        left: var(--sidebar-width);
        padding: 0 24px;
    }

    .topbar-left .brand {
        display: none;
    }

    .main-content {
        padding-top: var(--topbar-height);
    }

    .content-with-sidebar,
    .main-content > .container,
    .main-content > .container-fluid,
    .main-content > .content-wrapper {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        padding: 24px 28px;
    }
}

.sidebar-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 10px 18px;
    margin-bottom: 14px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: transparent;
    color: #fff;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: gap .28s cubic-bezier(.22, 1, .36, 1), padding .28s cubic-bezier(.22, 1, .36, 1), margin .28s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    flex: 0 0 38px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
    white-space: nowrap;
}

.sidebar-brand > span:not(.sidebar-brand-mark) {
    min-width: 0;
    max-width: 170px;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    transition: max-width .28s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-brand strong {
    font-size: 16px;
    line-height: 1.2;
}

.sidebar-brand small {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

body.sidebar-collapsed {
    --sidebar-width: var(--sidebar-collapsed-width);
}

@media (min-width: 981px) {
    .sidebar-toggle {
        position: fixed;
        top: 23px;
        left: calc(var(--sidebar-width) - 28px);
        z-index: 1060;
        width: 28px;
        min-height: 42px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.72);
        color: #bfdbfe;
        box-shadow: none;
        backdrop-filter: blur(12px);
        display: none;
        transition: left .22s ease, background .18s ease, border-color .18s ease, color .18s ease;
    }

    body.has-sidebar .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-toggle:hover,
    .sidebar-toggle:focus-visible,
    .sidebar-toggle:focus,
    .sidebar-toggle:active {
        outline: none;
        box-shadow: none;
        background: rgba(15, 23, 42, 0.72);
        color: #bfdbfe;
    }

    .sidebar-toggle i {
        font-size: 16px;
        line-height: 1;
    }

    body.sidebar-collapsed .app-sidebar {
        padding: 18px 10px;
        overflow: visible;
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        gap: 0;
        padding-right: 20px;
        padding-left: 0;
    }

    body.sidebar-collapsed .sidebar-brand > span:not(.sidebar-brand-mark) {
        max-width: 0;
        opacity: 0;
        transform: translateX(-8px);
    }

    body.sidebar-collapsed .sidebar-caption {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        transform: translateX(-8px);
    }

    body.sidebar-collapsed .sidebar-link > span {
        max-width: 0;
        opacity: 0;
        transform: translateX(-8px);
    }

    body.sidebar-collapsed .sidebar-link .sidebar-caret {
        margin-left: 0;
        width: 0;
        flex-basis: 0;
        opacity: 0;
        overflow: hidden;
    }

    body.sidebar-collapsed .sidebar-sublink {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-section + .sidebar-section {
        margin-top: 20px;
    }

    body.sidebar-collapsed .sidebar-link {
        justify-content: center;
        gap: 0;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        margin: 6px auto;
    }

    body.sidebar-collapsed .sidebar-link i:not(.sidebar-caret) {
        width: 22px;
        flex: 0 0 22px;
        font-size: 19px;
        text-align: center;
    }

    body.sidebar-collapsed .sidebar-menu-group > div {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-menu-group {
        position: relative;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover > div {
        position: absolute;
        top: -2px;
        left: calc(100% + 4px);
        z-index: 3600;
        min-width: 190px;
        display: block !important;
        padding: 8px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 8px;
        background: #111a2c;
        box-shadow: 14px 18px 42px rgba(15, 23, 42, 0.28);
    }

    body.sidebar-collapsed .sidebar-menu-group:hover > div::before {
        content: "";
        position: absolute;
        left: -6px;
        top: 18px;
        width: 10px;
        height: 10px;
        border-left: 1px solid rgba(148, 163, 184, 0.18);
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        background: #111a2c;
        transform: rotate(45deg);
    }

    body.sidebar-collapsed .sidebar-menu-group:hover > div::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: -14px;
        width: 14px;
        background: transparent;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover .sidebar-sublink {
        width: 100%;
        min-height: 42px;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        padding: 0 10px;
        color: #cbd5e1;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover .sidebar-sublink + .sidebar-sublink {
        margin-top: 4px;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover .sidebar-sublink::after {
        content: "\F285";
        color: #93c5fd;
        font-family: bootstrap-icons;
        font-size: 14px;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover .sidebar-sublink:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    body.sidebar-collapsed .sidebar-menu-group:hover .sidebar-sublink.active {
        background: linear-gradient(135deg, #2563eb, #0f766e);
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
        color: #fff;
    }

}

.content-header .row {
    margin: 0;
}

.content-header .col-sm-6 {
    padding: 0;
}

.content-header .breadcrumb {
    justify-content: flex-end;
}

.card-header .row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header .row > [class*="col-"] {
    flex: 0 0 auto;
    width: auto;
    padding: 0;
}

.card-header .row > .col-md-3 {
    width: min(360px, 100%);
}

.card-header .row > .col-md-4 {
    width: min(520px, 100%);
}

.card-header .row > .col-md-5 {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header .input-group {
    flex-wrap: nowrap;
}

.card-header .btn {
    min-width: 0;
}

.table > :not(caption) > * > * {
    padding: 12px 14px;
}

.table td:last-child,
.table th:last-child {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .sidebar-brand {
        padding-top: 0;
    }

    .card-header .row > [class*="col-"],
    .card-header .row > .col-md-3,
    .card-header .row > .col-md-4,
    .card-header .row > .col-md-5 {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}
.spa-confirm-modal .spa-confirm-dialog {
    max-width: 460px;
    margin: 1.5rem auto 0;
}

.spa-confirm-modal .modal-header,
.spa-confirm-modal .modal-footer {
    border: 0;
}

.spa-confirm-modal .modal-header {
    padding-bottom: 0.25rem;
}

.spa-confirm-modal .modal-footer {
    padding-top: 0.25rem;
}

/* Fullscreen Gantt dialogs live inside the dark board and must not inherit its light text. */
.gantt-board .spa-confirm-modal .modal-content {
    background: #fff;
    color: var(--app-text);
}

.gantt-board .spa-confirm-modal .modal-title,
.gantt-board .spa-confirm-modal .modal-body {
    color: #111827;
}

.gantt-board .spa-confirm-modal .modal-body {
    font-weight: 700;
}

/* Shared presentation for searchable data pickers and command menus. */
@keyframes app-dropdown-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes app-dropdown-enter-up {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-search-select.open .project-search-select-toggle,
.project-select-container:has(.project-select-menu:not(.d-none)) .project-select-toggle,
.search-select.open .search-select-toggle,
.defect-level-select.open .defect-level-select-toggle,
.executor-multi-select:has(.executor-multi-menu:not(.d-none)) .executor-multi-toggle,
.report-user-select[open] > summary,
.auto-task-select[open] > summary,
.notify-dropdown.open > .form-select,
.workload-project-cell.open > .project-toggle,
.workload-project-cell.open > .iteration-toggle,
.status-filter.open > .status-filter-toggle,
.executor-filter.open > .executor-filter-toggle,
.dropdown:has(> .dropdown-menu.show) > .dropdown-toggle {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.project-search-select-toggle:focus-visible,
.project-select-toggle:focus-visible,
.search-select-toggle:focus-visible,
.defect-level-select-toggle:focus-visible,
.executor-multi-toggle:focus-visible,
.report-user-select > summary:focus-visible,
.auto-task-select > summary:focus-visible,
.notify-dropdown > .form-select:focus-visible,
.workload-project-cell > .project-toggle:focus-visible,
.workload-project-cell > .iteration-toggle:focus-visible,
.defect-inline-toggle:focus-visible,
.dropdown-toggle:focus-visible {
    border-color: #60a5fa !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

:is(.project-select-toggle,
    .search-select-toggle,
    .defect-level-select-toggle,
    .executor-multi-toggle,
    .report-user-select > summary,
    .auto-task-select > summary,
    .notify-dropdown > .form-select,
    .workload-project-cell > .project-toggle,
    .workload-project-cell > .iteration-toggle,
    #creatorFilter > .dropdown-toggle,
    .defect-filter-form > .dropdown > .dropdown-toggle,
    .tool-switcher .dropdown-toggle,
    .status-filter > .status-filter-toggle,
    .executor-filter > .executor-filter-toggle) {
    border: 1px solid #ced4da !important;
    background-color: #fff !important;
    color: #111827 !important;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

:is(.project-select-toggle,
    .search-select-toggle,
    .defect-level-select-toggle,
    .executor-multi-toggle,
    .report-user-select > summary,
    .auto-task-select > summary,
    .notify-dropdown > .form-select,
    .workload-project-cell > .project-toggle,
    .workload-project-cell > .iteration-toggle,
    #creatorFilter > .dropdown-toggle,
    .defect-filter-form > .dropdown > .dropdown-toggle,
    .tool-switcher .dropdown-toggle,
    .status-filter > .status-filter-toggle,
    .executor-filter > .executor-filter-toggle):hover:not(:disabled) {
    border-color: #94a3b8 !important;
    background-color: #f8fafc !important;
}

:is(.project-select-toggle,
    .search-select-toggle,
    .defect-level-select-toggle,
    .executor-multi-toggle,
    .report-user-select > summary,
    .auto-task-select > summary,
    .notify-dropdown > .form-select,
    .workload-project-cell > .project-toggle,
    .workload-project-cell > .iteration-toggle,
    #creatorFilter > .dropdown-toggle,
    .defect-filter-form > .dropdown > .dropdown-toggle,
    .tool-switcher .dropdown-toggle,
    .status-filter > .status-filter-toggle,
    .executor-filter > .executor-filter-toggle):disabled {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

.project-search-select.open .project-search-select-menu,
.project-select-menu:not(.d-none),
.search-select.open .search-select-menu,
.defect-level-select.open .defect-level-select-menu,
.executor-multi-menu:not(.d-none),
.report-user-select[open] .report-user-menu,
.auto-task-select[open] .auto-task-menu,
.notify-dropdown.open .notify-dropdown-menu,
.workload-project-menu.open-floating,
.workload-project-cell.open .workload-project-menu,
.status-filter.open .status-filter-menu,
.executor-filter.open .executor-filter-menu,
.dropdown-menu.show {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
    animation: app-dropdown-enter 0.14s ease-out;
    transform-origin: top center;
}

:is(.project-select-container:has(.project-select-menu:not(.d-none)),
    .search-select.open,
    .defect-level-select.open,
    .executor-multi-select:has(.executor-multi-menu:not(.d-none)),
    .report-user-select[open],
    .auto-task-select[open],
    .notify-dropdown.open,
    .workload-project-cell.open,
    .status-filter.open,
    .executor-filter.open,
    .dropdown:has(> .dropdown-menu.show)) {
    z-index: 3100;
}

.card:has(.project-search-select.open,
    .project-select-menu:not(.d-none),
    .search-select.open,
    .defect-level-select.open,
    .executor-multi-menu:not(.d-none),
    .report-user-select[open],
    .auto-task-select[open],
    .notify-dropdown.open,
    .dropdown-menu.show) {
    overflow: visible !important;
}

:is(.list-toolbar-card,
    .defect-list-toolbar,
    .system-user-toolbar,
    .knowledge-list-toolbar)
    :is(.form-control,
        .form-select,
        .project-search-select-toggle,
        .btn,
        .dropdown-toggle) {
    height: 38px;
    min-height: 38px;
}

.report-case-filterbar
    :is(.form-control,
        .form-select,
        .project-search-select-toggle,
        .btn) {
    height: 40px;
    min-height: 40px;
}

.search-select.open-up.open .search-select-menu,
.notify-dropdown.open .notify-dropdown-menu[style*="bottom"] {
    animation-name: app-dropdown-enter-up;
    transform-origin: bottom center;
}

:is(.project-select-menu,
    .search-select-menu,
    .defect-level-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .status-filter-menu,
    .executor-filter-menu) {
    overflow: hidden;
}

:is(.project-select-menu,
    .search-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .filter-dropdown-menu) {
    padding: 0 !important;
}

:is(.search-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .filter-dropdown-menu) > :is(input[type="search"], input[type="text"]) {
    width: calc(100% - 16px);
    margin: 8px !important;
}

:is(.search-select-options,
    .executor-multi-options,
    .report-user-options,
    .auto-task-options,
    .notify-user-list,
    .workload-project-options,
    .filter-dropdown-options) {
    margin: 0 !important;
    padding: 6px 0 !important;
    overscroll-behavior: contain;
}

:is(.project-select-search-wrap,
    .search-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .filter-dropdown-menu) :is(input[type="search"], input[type="text"]) {
    height: 34px;
    border-color: #cbd5e1;
    border-radius: 6px;
    font-size: 0.875rem;
}

:is(.project-select-search-wrap,
    .search-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .filter-dropdown-menu) :is(input[type="search"], input[type="text"]):focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

:is(.project-select-option,
    .search-select-option,
    .defect-level-select-option,
    .executor-multi-option,
    .report-user-option,
    .auto-task-option,
    .notify-user-option,
    .workload-project-option,
    .workload-iteration-option,
    .creator-filter-options > label,
    .filter-dropdown-options > label,
    .status-filter-options > label,
    .executor-filter-options > label) {
    min-height: 34px;
    margin: 0 !important;
    padding: 7px 12px !important;
    border: 0;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 0.875rem;
    font-weight: 400 !important;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

:is(.project-select-option,
    .search-select-option,
    .defect-level-select-option,
    .executor-multi-option,
    .report-user-option,
    .auto-task-option,
    .notify-user-option,
    .workload-project-option,
    .workload-iteration-option,
    .creator-filter-options > label,
    .filter-dropdown-options > label,
    .status-filter-options > label,
    .executor-filter-options > label):hover,
.search-select-option.active,
.defect-level-select-option.active,
:is(.project-select-option,
    .executor-multi-option,
    .report-user-option,
    .auto-task-option,
    .notify-user-option,
    .creator-filter-options > label,
    .filter-dropdown-options > label,
    .status-filter-options > label,
    .executor-filter-options > label):has(input:checked) {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

:is(.creator-filter-options,
    .filter-dropdown-options,
    .status-filter-options,
    .executor-filter-options) > label {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

:is(.creator-filter-options,
    .filter-dropdown-options,
    .status-filter-options,
    .executor-filter-options) > label > .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin: 0 !important;
}

.project-search-select.open .project-search-select-toggle > i,
.user-dropdown:has(.dropdown-menu.show) .user-trigger > i,
.dropdown:has(> .dropdown-menu.show) > .dropdown-toggle::after,
.report-user-select[open] > summary::after,
.auto-task-select[open] > summary::after {
    transform: rotate(180deg);
}

.project-search-select-toggle > i,
.user-trigger > i,
.dropdown-toggle::after,
.report-user-select > summary::after,
.auto-task-select > summary::after {
    transition: transform 0.15s ease;
}

.report-user-select > summary,
.auto-task-select > summary {
    position: relative;
    padding: 0.375rem 2rem 0.375rem 0.75rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-task-select > summary::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: translateY(-65%) rotate(45deg);
}

.report-user-select[open] > summary::after,
.auto-task-select[open] > summary::after {
    transform: translateY(-35%) rotate(225deg);
}

.defect-inline-menu {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden;
}

.defect-inline-select.open .defect-inline-menu {
    animation: app-dropdown-enter 0.14s ease-out;
}

.defect-inline-menu > button:not(.btn),
.defect-inline-people-options > label {
    min-height: 32px;
    padding: 6px 10px !important;
    border: 0;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111827;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.defect-inline-menu > button:not(.btn):hover,
.defect-inline-people-options > label:hover,
.defect-inline-people-options > label:has(input:checked) {
    background: #dbeafe !important;
    color: #1d4ed8;
}

.dropdown-menu {
    border-radius: 8px;
}

.dropdown-item {
    min-height: 34px;
    border-radius: 6px;
    color: #111827;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (prefers-reduced-motion: reduce) {
    .project-search-select-menu,
    .project-select-menu,
    .search-select-menu,
    .defect-level-select-menu,
    .executor-multi-menu,
    .report-user-menu,
    .auto-task-menu,
    .notify-dropdown-menu,
    .workload-project-menu,
    .status-filter-menu,
    .executor-filter-menu,
    .defect-inline-menu,
    .dropdown-menu {
        animation: none !important;
    }
}

/* Gantt controls intentionally stay dark even after the shared picker theme. */
.gantt-person {
    border-bottom: 1px solid var(--gantt-grid-line);
}

.gantt-nav-group {
    gap: 6px;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.gantt-nav-group .gantt-view-group,
.gantt-nav-group .gantt-period-group {
    height: 30px;
    overflow: hidden;
    border: 1px solid #3b4d68;
    border-radius: 6px !important;
}

.gantt-nav-group .gantt-view-group {
    border-right: 1px solid #3b4d68;
}

.gantt-nav-group .btn,
.gantt-toolbar .btn-outline-secondary,
.gantt-toolbar .gantt-detail-action.btn-outline-secondary {
    height: 28px;
    border-color: #3b4d68 !important;
    background: #111c2d !important;
    color: #dbe7f5 !important;
}

.gantt-nav-group .btn:first-child {
    border-radius: 5px 0 0 5px !important;
}

.gantt-nav-group .btn:last-child {
    border-radius: 0 5px 5px 0 !important;
}

.gantt-toolbar .btn-outline-secondary:hover,
.gantt-toolbar .btn-outline-secondary.active {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #fff !important;
}

.gantt-range-label {
    margin-left: 2px;
    display: inline-flex;
    align-items: center;
    height: 30px;
    font-size: 13px;
    font-weight: 700;
    line-height: 30px;
}

.gantt-range-label + .gantt-people-filter {
    margin-left: auto;
}

.gantt-people-filter {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    z-index: 30;
}

.gantt-people-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 30px;
    padding: 3px 8px;
    overflow: hidden;
    border: 1px solid #33445d;
    border-radius: 6px;
    background: #111c2d;
    color: #dbe7f5;
    font-size: 11px;
    text-align: left;
}

.gantt-people-toggle > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-people-filter.open .gantt-people-toggle {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.gantt-people-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 5000;
    width: 220px;
    padding: 8px;
    border: 1px solid #33445d;
    border-radius: 8px;
    background: #111c2d;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

.gantt-people-filter.open .gantt-people-menu {
    display: block;
}

.gantt-people-menu .form-control,
.gantt-board .project-search-select-search input,
.gantt-editor-content .project-search-select-search input {
    border-color: #33445d !important;
    background: #111c2d !important;
    color: #dbe7f5 !important;
}

.gantt-people-options {
    max-height: 240px;
    margin-top: 6px;
    overflow-y: auto;
}

.gantt-people-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 0;
    padding: 5px 7px;
    border-radius: 5px;
    color: #dbe7f5;
    cursor: pointer;
}

.gantt-people-option:hover,
.gantt-people-option:has(input:checked) {
    background: #243b5a;
    color: #fff;
}

.gantt-people-empty {
    padding: 10px 6px 4px;
    color: #8493a8;
    font-size: 12px;
    text-align: center;
}

.gantt-board .project-search-select.open .project-search-select-menu,
.gantt-board .project-search-select-search,
.gantt-board .project-search-select-options,
.gantt-board .project-search-select-option,
.gantt-editor-content .project-search-select.open .project-search-select-menu,
.gantt-editor-content .project-search-select-search,
.gantt-editor-content .project-search-select-options,
.gantt-editor-content .project-search-select-option {
    border-color: #33445d !important;
    background: #111c2d !important;
    color: #dbe7f5 !important;
}

.gantt-board .project-search-select-option:hover,
.gantt-board .project-search-select-option.active,
.gantt-editor-content .project-search-select-option:hover,
.gantt-editor-content .project-search-select-option.active {
    background: #243b5a !important;
    color: #fff !important;
}

.gantt-board .project-search-select-empty,
.gantt-editor-content .project-search-select-empty {
    background: #111c2d !important;
    color: #8493a8 !important;
}

#ganttBatchModal .form-select,
#ganttBatchModal option {
    color-scheme: dark;
    border-color: #33445d !important;
    background: #111c2d !important;
    color: #dbe7f5 !important;
}

.gantt-nav-group .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}

.gantt-nav-group .gantt-nav-label {
    display: block;
    line-height: 14px;
    transform: translateY(-2px);
}

.gantt-nav-group .gantt-period-group [data-gantt-prev] > i,
.gantt-nav-group .gantt-period-group [data-gantt-next] > i {
    display: block;
    line-height: 1;
    transform: translateY(-2px);
}

.gantt-board .project-search-select-toggle,
.gantt-editor-content .project-search-select-toggle,
#ganttBatchModal .project-search-select-toggle {
    overflow: hidden;
}

.gantt-board .project-search-select-label,
.gantt-editor-content .project-search-select-label,
#ganttBatchModal .project-search-select-label {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.gantt-board .gantt-day.today {
    border: 0 !important;
    background: #2563eb !important;
    color: #fff !important;
}

.gantt-board .gantt-day.today span,
.gantt-board .gantt-day.today strong {
    color: #fff !important;
}

.gantt-tag-manager-content .list-group-item {
    border-color: #31506f;
    background: #13243a;
    color: #dbe7f5;
}

.gantt-tag-manager-content .form-control,
.gantt-batch-content .form-control,
.gantt-batch-content .form-select,
.gantt-batch-content option {
    color-scheme: dark;
    border-color: #294866 !important;
    background: #0d1b2a !important;
    color: #eef5ff !important;
}

.gantt-tag-manager-content .text-muted,
.gantt-batch-content .text-muted {
    color: #9fb0c4 !important;
}

.gantt-tag-manager-content .list-group-item > .form-control {
    min-width: 0;
    flex: 1 1 auto;
}

.gantt-tag-manager-content .list-group-item > .btn {
    flex: 0 0 auto;
    min-width: 54px;
    white-space: nowrap;
}

.gantt-board .gantt-operation-menu > .dropdown-menu.show {
    z-index: 5000;
    min-width: 136px;
    padding: 5px !important;
    border-color: #33445d !important;
    background: #111c2d !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38) !important;
}

.gantt-board .gantt-operation-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    border-radius: 5px;
    background: #111c2d !important;
    color: #dbe7f5 !important;
    font-size: 12px;
    white-space: nowrap;
}

.gantt-board .gantt-operation-menu .dropdown-item:hover,
.gantt-board .gantt-operation-menu .dropdown-item:focus {
    background: #243b5a !important;
    color: #fff !important;
}

.gantt-board .gantt-operation-menu .dropdown-item.text-danger {
    color: #fca5a5 !important;
}

/* Task progress list keeps filters compact and on the title row. */
.gantt-task-list-toolbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    row-gap: 10px;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.gantt-task-list-toolbar-row > h3 {
    flex: 0 0 auto;
    margin-right: 8px;
    font-size: 22px;
}

.gantt-task-list-toolbar-row #taskListSearch {
    width: 120px;
    min-width: 120px;
    flex: 0 0 120px;
}

.gantt-task-list-toolbar-row #taskListStatus + .project-search-select {
    width: 112px;
    min-width: 112px;
    flex: 0 0 112px;
}

.gantt-task-list-toolbar-row #taskListPriority + .project-search-select {
    width: 128px;
    min-width: 128px;
    flex: 0 0 128px;
}

.gantt-task-list-toolbar-row #taskListProject + .project-search-select {
    width: 112px;
    min-width: 112px;
    flex: 0 0 112px;
}

.gantt-task-list-toolbar-row #taskListIteration + .project-search-select {
    width: 144px;
    min-width: 144px;
    flex: 0 0 144px;
}

.gantt-list-date-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.gantt-list-date-filter .form-control {
    width: 128px;
    min-width: 128px;
    flex: 0 0 128px;
}

.gantt-task-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    padding-inline: 6px;
    white-space: nowrap;
}

.gantt-task-reset > i {
    display: none;
}

.gantt-task-filter-cascade {
    position: relative;
    flex: 0 0 auto;
}

.gantt-task-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    height: 38px;
    white-space: nowrap;
}

.gantt-task-filter-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 4100;
    display: none;
    width: 154px;
    padding: 6px;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.gantt-task-filter-cascade.open .gantt-task-filter-menu {
    display: block;
}

.gantt-task-filter-category,
.gantt-task-filter-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--app-text);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.gantt-task-filter-category {
    justify-content: space-between;
    padding: 6px 9px;
}

.gantt-task-filter-category:hover,
.gantt-task-filter-category.active,
.gantt-task-filter-option:hover,
.gantt-task-filter-option.active {
    background: var(--app-primary-soft);
    color: var(--app-primary);
}

.gantt-task-filter-options {
    position: absolute;
    top: -1px;
    left: calc(100% + 4px);
    display: none;
    width: max-content;
    min-width: 180px;
    max-width: 300px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.gantt-task-filter-options.show {
    display: block;
}

.gantt-task-filter-search {
    position: sticky;
    top: -6px;
    z-index: 1;
    margin: -6px -6px 4px;
    padding: 6px;
    background: #fff;
}

.gantt-task-filter-search .form-control {
    width: 100%;
    min-width: 0;
    height: 32px;
    font-size: 13px;
}

.gantt-task-filter-option {
    overflow: hidden;
    padding: 6px 10px;
    text-overflow: ellipsis;
}

.gantt-task-list-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.gantt-task-list-actions .btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.gantt-task-list-actions .dropdown {
    flex: 0 0 auto;
}

@media (max-width: 1100px) {
    .gantt-task-list-toolbar-row > h3 {
        width: 100%;
    }

    .gantt-task-list-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.gantt-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 5px 8px;
    color: #fff !important;
}

.gantt-status-badge.status-未开始 { background: #6b7280; }
.gantt-status-badge.status-进行中 { background: #3b82f6; }
.gantt-status-badge.status-已完成 { background: #10b981; }
.gantt-status-badge.status-已延期 { background: #ef4444; }
.gantt-status-badge.status-已阻塞 { background: #f59e0b; color: #111827 !important; }

.gantt-task-check-cell {
    width: 44px;
    min-width: 44px;
    text-align: center;
}

.gantt-task-list-table {
    width: 100%;
    table-layout: fixed;
}

.gantt-task-list-table .gantt-task-check-col { width: 44px; }
.gantt-task-list-table .gantt-task-name-col { width: auto; }
.gantt-task-list-table .gantt-task-project-col { width: 13.333%; }
.gantt-task-list-table .gantt-task-progress-col { width: 240px; }
.gantt-task-list-table .gantt-task-status-col { width: 92px; }
.gantt-task-list-table .gantt-task-priority-col { width: 78px; }
.gantt-task-list-table .gantt-task-time-col { width: 210px; }

.gantt-task-name-cell,
.gantt-task-project-cell {
    min-width: 0;
    overflow: hidden;
}

.gantt-task-name-link {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #111827 !important;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-task-name-link:hover,
.gantt-task-name-link:focus-visible {
    color: var(--app-primary) !important;
    text-decoration: none;
}

.gantt-task-project-text {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Task progress reuses the Gantt editors but keeps its list-page light theme. */
body:has(.gantt-task-list-page) .gantt-editor-content,
body:has(.gantt-task-list-page) .gantt-editor-content .modal-header,
body:has(.gantt-task-list-page) .gantt-editor-content .modal-footer {
    border-color: var(--app-border) !important;
    background: #fff !important;
    color: var(--app-text) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

body:has(.gantt-task-list-page) .gantt-editor-content .modal-title,
body:has(.gantt-task-list-page) .gantt-editor-content .form-label {
    color: var(--app-text) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .btn-close {
    filter: none !important;
    opacity: 0.7;
}

body:has(.gantt-task-list-page) .gantt-editor-content .form-control,
body:has(.gantt-task-list-page) .gantt-editor-content .form-select,
body:has(.gantt-task-list-page) .gantt-editor-content select,
body:has(.gantt-task-list-page) .gantt-editor-content option,
body:has(.gantt-task-list-page) #ganttBatchModal .form-select,
body:has(.gantt-task-list-page) #ganttBatchModal option {
    color-scheme: light !important;
    border-color: var(--app-border-strong) !important;
    background: #fff !important;
    color: var(--app-text) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .form-control::placeholder {
    color: var(--app-muted) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content [data-task-manage-tag] {
    color: #1d4ed8 !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content [data-task-manage-tag]:hover,
body:has(.gantt-task-list-page) .gantt-editor-content [data-task-manage-tag]:focus-visible {
    color: #1e3a8a !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-toggle,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-menu,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-search,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-search input,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-options,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-option,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-empty {
    border-color: var(--app-border-strong) !important;
    background: #fff !important;
    color: var(--app-text) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-option:hover,
body:has(.gantt-task-list-page) .gantt-editor-content .project-search-select-option.active {
    background: var(--app-primary-soft) !important;
    color: var(--app-primary-dark) !important;
}

body:has(.gantt-task-list-page) .gantt-tag-manager-content .list-group-item {
    border-color: var(--app-border) !important;
    background: #fff !important;
    color: var(--app-text) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .text-muted {
    color: var(--app-muted) !important;
}

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-tag-option span {
    border-color: var(--app-border-strong);
    color: var(--app-text);
}

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option {
    opacity: 1;
    box-shadow: none;
}

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-secondary { background: #e5e7eb; color: #4b5563; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-primary { background: #dbeafe; color: #1d4ed8; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-success { background: #d1fae5; color: #047857; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-danger { background: #fee2e2; color: #b91c1c; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-warning { background: #fef3c7; color: #92400e; }

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-secondary.active { background: #4b5563; color: #fff; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-primary.active { background: #1d4ed8; color: #fff; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-success.active { background: #047857; color: #fff; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-danger.active { background: #b91c1c; color: #fff; }
body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option.status-warning.active { background: #b45309; color: #fff; }

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-status-option:hover:not(.active) {
    opacity: 0.82;
    box-shadow: none;
}

body:has(.gantt-task-list-page) .gantt-editor-content .gantt-progress-editor input[type="range"] {
    background: linear-gradient(90deg, #3b82f6 0 var(--progress), #d1d5db var(--progress) 100%);
}

.gantt-row {
    position: relative;
}

.gantt-person {
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.gantt-board.is-person-reordering,
.gantt-board.is-person-reordering .gantt-person {
    cursor: grabbing;
}

.gantt-row.person-dragging {
    opacity: 0.42;
}

.gantt-row.person-drop-before::before,
.gantt-row.person-drop-after::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 12;
    height: 3px;
    pointer-events: none;
    background: #3b82f6;
    box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.5);
}

.gantt-row.person-drop-before::before {
    top: -1px;
}

.gantt-row.person-drop-after::after {
    bottom: -1px;
}
