@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('/_content/Radzen.Blazor/fonts/MaterialSymbolsOutlined.woff2') format('woff2');
}

.material-icons {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0; padding: 0;
}

html {
    scrollbar-gutter: stable;
}

/* ─── Global colour overrides (dark-blue primary) ──── */
:root {
    --rz-primary:            #1e3a5f;
    --rz-primary-darker:     #162d4a;
    --rz-primary-lighter:    #2563a8;
    --rz-on-primary:         #ffffff;
    --app-primary:           #1e3a5f;
    --app-primary-dark:      #162d4a;
    --app-primary-light:     #dbeafe;
    --app-primary-text:      #1e3a5f;
}

/* ─── Chat layout ─────────────────────────────────── */
.chat-msg { display: flex; flex-direction: column; }
.chat-msg--user { align-items: flex-end; }
.chat-msg--assistant { align-items: flex-start; }

.chat-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
}
.chat-avatar--user { background: #1e3a5f; color: white; }
.chat-avatar--bot  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

.chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    word-break: break-word;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.chat-bubble--user {
    background: #1e3a5f;
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-bubble--assistant {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.chat-bubble--error { background: #fef2f2; border-color: #fecaca; }

.chat-md code {
    background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px;
    font-family: 'Courier New', monospace; font-size: .88em;
}
.chat-md strong { font-weight: 600; }

/* Typing indicator */
.chat-bubble--typing {
    display: flex; align-items: center; gap: 4px;
    padding: 14px 18px;
}
.typing-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #9ca3af;
    animation: typing-bounce .9s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity:.6; }
    30% { transform: translateY(-5px); opacity:1; }
}

/* Input bar */
.chat-input-bar {
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
}
.voice-indicator {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; margin-bottom: 8px;
    background: #fef2f2; border-radius: 8px;
    border: 1px solid #fecaca;
    animation: pulse-border 1.2s ease-in-out infinite;
}
@keyframes pulse-border {
    0%, 100% { border-color: #fecaca; }
    50% { border-color: #ef4444; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(0.75); }
}

/* Quick command sidebar items */
.quick-cmd {
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
    display: flex; flex-direction: column; gap: 1px;
}
.quick-cmd:hover { background: var(--mud-palette-action-hover); }

/* ─── Jira-like Board ────────────────────────────── */

/* Board container — horizontal scroll */
.jira-board-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: flex-start;
    padding-bottom: 16px;
    min-height: calc(100vh - 190px);
}

/* Column */
.jira-col {
    flex: 1 0 230px;
    min-width: 200px;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    border-radius: 6px;
    background: #f4f5f7;
    transition: background .12s, outline .12s;
}
.jira-col--over {
    background: #e8f0fe !important;
    outline: 2px dashed #4c9aff;
    outline-offset: -2px;
}

/* Column header */
.jira-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    border-top: 3px solid var(--col-color, #9ca3af);
    background: white;
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
    box-shadow: 0 1px 0 #e5e7eb;
}
.jira-col-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #44546f;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jira-col-count {
    font-size: 11px;
    font-weight: 700;
    color: #626f86;
    background: #dfe1e6;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}
.jira-col-add-btn {
    width: 22px; height: 22px;
    border: none;
    background: transparent;
    color: #626f86;
    border-radius: 3px;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, color .12s;
    padding: 0;
    flex-shrink: 0;
}
.jira-col-add-btn:hover { background: #dfe1e6; color: #172b4d; }

.jira-col-rename-btn { opacity: 0; transition: opacity .15s; }
.jira-col-header:hover .jira-col-rename-btn { opacity: 1; }

/* Column body */
.jira-col-body {
    padding: 6px 8px 8px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 64px;
}
.jira-col-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    color: #adb5bd;
    font-size: 12px;
    border: 2px dashed #dfe1e6;
    border-radius: 4px;
    user-select: none;
    pointer-events: none;
}

/* ─── Card ───────────────────────────────────────── */
.jira-card {
    background: white;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(9,30,66,.1), 0 0 0 1px rgba(9,30,66,.06);
    cursor: grab;
    border-left: 3px solid var(--type-color, #dfe1e6);
    transition: box-shadow .12s, transform .1s;
    user-select: none;
    position: relative;
}
.jira-card:hover {
    box-shadow: 0 4px 14px rgba(9,30,66,.16), 0 0 0 1px rgba(9,30,66,.08);
    transform: translateY(-1px);
}
.jira-card:active { cursor: grabbing; }
.jira-card--dragging {
    opacity: 0.42;
    box-shadow: none !important;
    transform: none !important;
}
.jira-card--selected {
    box-shadow: 0 0 0 2px #4c9aff, 0 2px 8px rgba(76,154,255,.25) !important;
}
.jira-card-body { padding: 9px 11px 9px; }

/* Card: type row */
.jira-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 6px;
}
.jira-card-type {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--type-color, #626f86);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.jira-type-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--type-color, #9ca3af);
    flex-shrink: 0;
    display: inline-block;
}
.jira-card-id {
    font-size: 10px;
    color: #adb5bd;
    white-space: nowrap;
    font-weight: 500;
}

/* Card: title */
.jira-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #172b4d;
    line-height: 1.45;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jira-card-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card: footer */
.jira-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 20px;
}
.jira-card-footer-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.jira-card-footer-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.jira-story-pts {
    font-size: 10px;
    font-weight: 700;
    background: #dfe1e6;
    color: #44546f;
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
}
.jira-tag {
    font-size: 10px;
    padding: 1px 6px;
    background: #ede9fe;
    color: #6d28d9;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.jira-prio-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.jira-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #c0c8d8;
    color: #263858;
    display: flex; align-items: center; justify-content: center;
    font-size: 8.5px;
    font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* ─── Legacy board tag (used in chat cards too) ──── */
.board-tag {
    font-size: 11px; padding: 1px 7px;
    background: #ede9fe; color: #6d28d9;
    border-radius: 10px; font-weight: 500;
    white-space: nowrap;
}

/* ─── Work Item cards (chat + list) ─────────────── */
.wi-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    transition: box-shadow .15s;
}
.wi-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.09); }
.wi-state-badge {
    font-size: 11px; padding: 2px 8px; border-radius: 10px;
    font-weight: 600; white-space: nowrap;
}

/* ─── Work Item detail card ──────────────────────── */
.work-item-detail-card { overflow: hidden; }
/* \u2500\u2500 Standard type icon (replaces type text everywhere) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.wi-type-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; padding: 2px; flex-shrink: 0; cursor: default; }\n.wi-type-icon .rz-icon { line-height: 1; }\n/* Ensure tooltip appears on hover */\n.wi-type-icon[title]:hover::after { content: attr(title); position: absolute; background: #1e293b; color: white; font-size: .7rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; z-index: 9999; margin-top: 20px; pointer-events: none; }\n.detail-card-header { border-radius: 4px 4px 0 0; }
/* Inline edit form inside detail card */
.wi-edit-form { padding: 14px 16px; border-top: 1px solid #e2e8f0; }

/* ── Description drop zone ────────────────────────────────────────────── */
.desc-dropzone {
    position: relative;
    border: 2px dashed transparent;
    border-radius: 6px;
    transition: border-color .15s, background .15s;
}
.desc-dropzone--over {
    border-color: var(--rz-primary, #3b82f6);
    background: rgba(59,130,246,.06);
}
.desc-dropzone-hint {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 600; color: var(--rz-primary, #3b82f6);
    pointer-events: none;
    background: rgba(255,255,255,.7);
    border-radius: 4px;
}
.img-tool-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 5px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #475569; cursor: pointer;
    transition: background .12s, color .12s;
}
.img-tool-btn:hover { background: var(--rz-primary, #3b82f6); color: white; border-color: transparent; }
.desc-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.desc-image-thumb {
    position: relative; width: 80px; height: 60px;
    border-radius: 5px; overflow: hidden; border: 1px solid #e2e8f0;
    background: #f1f5f9;
}
.desc-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.desc-image-remove {
    position: absolute; top: 2px; right: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: white;
    border: none; cursor: pointer; font-size: 9px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.desc-image-remove:hover { background: #ef4444; }

/* ── Attachment list ──────────────────────────────────────────────────── */
.attachment-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.attachment-row {
    display: flex; align-items: center; gap: 8px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 6px 10px; min-height: 36px;
}
.attachment-row:hover { background: #f1f5f9; }
.attachment-icon { font-size: 1rem; flex-shrink: 0; }
.attachment-name {
    flex: 1; font-size: .82rem; color: #1e293b; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.attachment-size { font-size: .72rem; color: #94a3b8; flex-shrink: 0; white-space: nowrap; }
.attachment-pending-badge {
    font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 8px;
    background: #fef9c3; color: #854d0e; flex-shrink: 0;
}

/* ── Settings Page ────────────────────────────────────────────────────── */
.settings-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}
.settings-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.settings-body-layout {
    display: flex; gap: 0; min-height: 500px;
    border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
}
.settings-leftnav {
    width: 200px; flex-shrink: 0;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc; padding: 10px 8px;
    display: flex; flex-direction: column; gap: 2px;
}
.settings-leftnav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 7px;
    font-size: .84rem; font-weight: 500;
    color: #475569; background: transparent; border: none;
    cursor: pointer; white-space: nowrap; text-align: left;
    width: 100%; transition: background .12s, color .12s;
}
.settings-leftnav-item:hover { background: #e2e8f0; color: #1e293b; }
.settings-leftnav-item--active { background: #4f46e5; color: #fff; }
.settings-leftnav-item--active:hover { background: #4338ca; }
.settings-content { flex: 1; padding: 20px 24px; min-width: 0; overflow-y: auto; }
.settings-section { padding: 4px 0; }
.settings-desc { font-size: .85rem; color: #64748b; margin-bottom: 20px; }
.settings-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin: 0 0 10px; }
.settings-form-row { margin-bottom: 14px; }
.settings-label { display: block; font-size: .8rem; font-weight: 600; color: #475569; margin-bottom: 4px; }
.settings-hint { font-size: .72rem; font-weight: 400; color: #94a3b8; }
.settings-error { font-size: .8rem; color: #ef4444; margin-bottom: 8px; }
.settings-empty { font-size: .85rem; color: #94a3b8; text-align: center; padding: 24px 0; }
.settings-list { display: flex; flex-direction: column; gap: 4px; }
.settings-list-row {
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px;
    padding: 8px 12px; min-height: 40px;
}
.settings-list-row:hover { background: #f1f5f9; }
.settings-list-row--group { padding: 10px 14px; }
.settings-badge { font-size: .65rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.settings-badge--builtin { background: #e2e8f0; color: #475569; }
.settings-project-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px; margin-top: 6px;
}
/* Work item mapping badges (Settings tab 6) */
.mapping-badge {
    display: inline-block; padding: 3px 10px; border-radius: 99px;
    font-size: .78rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; min-width: 110px; text-align: center;
}
.mapping-badge--aiforge { background: #ede9fe; color: #6d28d9; }
.settings-project-check {
    display: flex; align-items: center; gap: 7px;
    font-size: .83rem; cursor: pointer;
}
/* Dialog */
.settings-overlay {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(0,0,0,.45);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px;
}
.settings-dialog {
    background: #fff; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: min(560px, 96vw); max-height: 88vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.settings-dialog-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #e2e8f0;
    font-weight: 700; font-size: .95rem;
}
.settings-dialog-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.settings-dialog-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 18px; border-top: 1px solid #e2e8f0;
}
.work-item-description {
    font-size: .875rem; line-height: 1.6;
    color: #1e293b;
}
/* Neutralise inline background/color styles injected by Azure DevOps HTML */
.work-item-description [style*="background"],
.work-item-description [style*="color"] {
    background: transparent !important;
    color: inherit !important;
}
.work-item-description p { margin: 0 0 8px; }
.work-item-description ul, .work-item-description ol { padding-left: 20px; margin: 0 0 8px; }

/* ─── DescriptionViewer — inline image link ─────── */
.desc-img-link {
    display: inline;
    text-decoration: none;
    vertical-align: baseline;
    margin: 0 2px;
    cursor: pointer;
    line-height: inherit;
}
.desc-img-link:hover .desc-img-badge { background: #dbeafe; border-color: #1e3a5f; color: #1e3a5f; }
.desc-img-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    background: #f1f5f9;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    font-size: 11px; font-weight: 700; font-style: normal; font-family: sans-serif;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
    transition: background .15s, border-color .15s, color .15s;
}

/* ─── DescriptionViewer — lightbox ──────────────── */
.desc-lb-backdrop {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    animation: lb-fade-in .15s ease;
}
@keyframes lb-fade-in { from { opacity: 0 } to { opacity: 1 } }
.desc-lb-box {
    position: relative; max-width: 90vw; max-height: 90vh;
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.desc-lb-img {
    display: block; max-width: 90vw; max-height: 85vh;
    object-fit: contain;
}
.desc-lb-close {
    position: absolute; top: 8px; right: 8px; z-index: 1;
    background: rgba(0,0,0,0.55); color: #fff; border: none;
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem;
    transition: background .15s;
}
.desc-lb-close:hover { background: rgba(0,0,0,0.8); }

/* ─── Device code ────────────────────────────────── */
.device-code {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem; letter-spacing: 0.5rem;
    background: #1e1e1e; color: #4fc3f7;
    padding: 16px 24px; border-radius: 8px; text-align: center;
}

/* ─── Blazor error boundary ──────────────────────── */
.blazor-error-boundary {
    background: #b32121; color: white;
    padding: 1rem 1rem 1rem 3.7rem;
}
.blazor-error-boundary::after { content: "An error has occurred." }

/* ═══════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════ */

/* Stat cards */
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 10px;
    color: white;
    min-height: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.dash-stat-card--blue   { background: linear-gradient(135deg, #162d4a 0%, #1e3a5f 100%); }
.dash-stat-card--green  { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.dash-stat-card--red    { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }
.dash-stat-card--purple { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); }

.dash-stat-icon {
    opacity: .85;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
}
.dash-stat-body { display: flex; flex-direction: column; }
.dash-stat-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
}
.dash-stat-label {
    font-size: 11px;
    opacity: .88;
    font-weight: 500;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .dash-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .dash-stat-card {
        gap: 10px;
        min-width: 0;
        padding: 12px;
    }
    .dash-stat-icon { width: 32px; }
    .dash-stat-num { font-size: 1.5rem; }
}

/* Count chip used in by-priority section */
.dash-count-chip {
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 8px;
    min-width: 28px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Recently updated rows */
.dash-recent-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: start;
    gap: 4px 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid #f1f5f9;
    min-width: 0;
}
.dash-recent-row:last-child { border-bottom: none; }
.dash-recent-row:hover { background: #f8fafc; }
.dash-recent-id {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 36px;
}
.dash-recent-title {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.28;
    grid-column: 3;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}
.dash-recent-meta {
    grid-column: 2 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
    flex-wrap: wrap;
}
.dash-recent-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.dash-recent-date {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 42px;
    text-align: right;
}

@media (max-width: 560px) {
    .dash-recent-row {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
    }
    .dash-recent-row .wi-type-icon { grid-column: 1; grid-row: 1; }
    .dash-recent-id { grid-column: 2; grid-row: 1; min-width: 0; }
    .dash-recent-title { grid-column: 1 / -1; grid-row: 2; }
    .dash-recent-meta {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: flex-start;
    }
    .dash-recent-date { min-width: auto; text-align: left; }
}

/* Quick nav grid */
.dash-quick-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.dash-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: background .12s, color .12s;
    text-align: center;
    color: #44546f;
}
.dash-quick-link:hover {
    background: #e8f0fe;
    color: #1e3a5f;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════
   SPRINT BOARD
═══════════════════════════════════════════════════ */

.sprint-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

/* Sprint header */
.sprint-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.sprint-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sprint-name {
    font-size: 15px;
    font-weight: 700;
    color: #172b4d;
}
.sprint-full-path {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.sprint-item-badge {
    font-size: 11px;
    background: #dfe1e6;
    color: #44546f;
    border-radius: 10px;
    padding: 2px 8px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.sprint-sp-badge {
    font-size: 11px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 10px;
    padding: 2px 8px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Swim lane */
.sprint-lane {
    border-bottom: 1px solid #f1f5f9;
}
.sprint-lane:last-child { border-bottom: none; }
.sprint-lane-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--lane-color, #9ca3af)0d;
    border-left: 3px solid var(--lane-color, #9ca3af);
}
.sprint-lane-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #44546f;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex: 1;
}
.sprint-lane-count {
    font-size: 11px;
    font-weight: 700;
    background: #dfe1e6;
    color: #626f86;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}
.sprint-lane-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px 12px;
}
.sprint-lane-empty {
    color: #adb5bd;
    font-size: 12px;
    padding: 6px 16px 10px;
    font-style: italic;
}

/* Sprint card */
.sprint-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--type-color, #dfe1e6);
    border-radius: 4px;
    padding: 9px 11px;
    width: 220px;
    cursor: pointer;
    transition: box-shadow .12s, transform .1s;
    box-shadow: 0 1px 3px rgba(9,30,66,.06);
}
.sprint-card:hover {
    box-shadow: 0 4px 12px rgba(9,30,66,.14);
    transform: translateY(-1px);
}
.sprint-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 6px;
}
.sprint-card-type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--type-color, #626f86);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.sprint-card-id {
    font-size: 10px;
    color: #adb5bd;
    white-space: nowrap;
    font-weight: 500;
}
.sprint-card-title {
    font-size: 12.5px;
    font-weight: 500;
    color: #172b4d;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sprint-card-footer {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sprint-state-badge {
    font-size: 9.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   BACKLOG
═══════════════════════════════════════════════════ */

/* Summary chips */
.backlog-summary-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
}
.backlog-summary-chip--total      { background: #e2e8f0; color: #475569; }
.backlog-summary-chip--critical   { background: #fee2e2; color: #dc2626; }
.backlog-summary-chip--high       { background: #ffedd5; color: #ea580c; }
.backlog-summary-chip--unscheduled { background: #fef9c3; color: #a16207; }

/* Column headers row */
.backlog-col-headers {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}

/* Priority group */
.backlog-group { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.backlog-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--group-color, #9ca3af)0d;
    border-left: 3px solid var(--group-color, #9ca3af);
    cursor: pointer;
    user-select: none;
}
.backlog-group-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.backlog-group-label {
    font-size: 12px;
    font-weight: 700;
    color: #44546f;
    flex: 1;
}
.backlog-group-count {
    font-size: 11px;
    font-weight: 700;
    background: #dfe1e6;
    color: #626f86;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}
.backlog-empty {
    color: #adb5bd;
    font-size: 12px;
    font-style: italic;
    padding: 10px 16px;
}

/* Backlog row */
.backlog-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background .1s;
    min-height: 42px;
}
.backlog-row:last-child { border-bottom: none; }
.backlog-row:hover { background: #f8fafc; }
.backlog-row--selected { background: #eff6ff !important; }

/* Column sizing */
.backlog-col-id       { display: flex; align-items: center; gap: 5px; width: 72px; flex-shrink: 0; }
.backlog-col-title    { flex: 1; min-width: 0; }
.backlog-col-type     { width: 96px; flex-shrink: 0; }
.backlog-col-state    { width: 100px; flex-shrink: 0; }
.backlog-col-sprint   { width: 96px; flex-shrink: 0; }
.backlog-col-sp       { width: 44px; flex-shrink: 0; text-align: right; }
.backlog-col-assignee { width: 32px; flex-shrink: 0; display: flex; justify-content: center; }
.backlog-col-actions  { width: 32px; flex-shrink: 0; display: flex; justify-content: center; }

.backlog-item-id {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}
.backlog-item-title {
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.backlog-type-chip {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}
.backlog-state-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}
.backlog-sprint {
    font-size: 11px;
    color: #6366f1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.backlog-no-sp {
    font-size: 11px;
    color: #d1d5db;
}

/* Empty unassigned avatar variant */
.jira-avatar--empty {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
}

/* ═══════════════════════════════════════════════════
   BACKLOG DRAG-AND-DROP
═══════════════════════════════════════════════════ */

/* Drag handle column */
.backlog-drag-handle {
    width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #d1d5db;
    cursor: grab;
    user-select: none;
    transition: color .1s;
    line-height: 1;
}
.backlog-row:hover .backlog-drag-handle { color: #9ca3af; }
.backlog-drag-handle:active { cursor: grabbing; }

/* Row states during drag */
.backlog-row--dragging {
    opacity: 0.38;
    pointer-events: none;
}

/* Drop indicator: blue line above or below the row */
.backlog-row--drop-above {
    border-top: 2px solid #4c9aff !important;
    background: #eff6ff;
}
.backlog-row--drop-below {
    border-bottom: 2px solid #4c9aff !important;
    background: #eff6ff;
}

/* Empty group drop target */
.backlog-empty--droptarget {
    border: 2px dashed #c7d2fe;
    background: #eef2ff;
    color: #6366f1;
    font-style: normal;
    font-weight: 500;
    pointer-events: all;
    cursor: copy;
    transition: background .12s, border-color .12s;
}
.backlog-empty--droptarget:hover {
    background: #e0e7ff;
    border-color: #6366f1;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* Active filter indicator dot */
.backlog-filter-active-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #1e3a5f;
    display: inline-block;
    flex-shrink: 0;
}

/* Clear-filters button (native button inside MudStack) */
.backlog-clear-filters-btn {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .12s;
    flex-shrink: 0;
}
.backlog-clear-filters-btn:hover { background: #fee2e2; }

/* ── AppBar project chip (replaces dropdown) ──────────────────────────────── */
.appbar-project-selector { position: relative; margin-right: 8px; flex-shrink: 0; z-index: 1001; }
.appbar-project-clickaway { position: fixed; inset: 0; z-index: 1000; }
.appbar-project-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.95);
    border-radius: 8px;
    padding: 5px 8px 5px 5px;
    font-size: .82rem; font-weight: 500;
    cursor: pointer;
    max-width: 220px;
    transition: background .13s, border-color .13s;
}
.appbar-project-chip:hover, .appbar-project-chip--open {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.4);
}
.appbar-project-avatar {
    width: 22px; height: 22px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; color: white;
    flex-shrink: 0; letter-spacing: 0;
}
.appbar-project-name {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 140px; flex: 1;
}
.appbar-project-switch-icon {
    font-size: 16px; opacity: .65; flex-shrink: 0;
    transition: opacity .13s;
}
.appbar-project-chip:hover .appbar-project-switch-icon,
.appbar-project-chip--open .appbar-project-switch-icon { opacity: 1; }
.appbar-designer-status {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 34px;
    padding: 0;
    position: relative;
    color: #ddd6fe;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: background .13s, border-color .13s, color .13s;
}
.appbar-designer-status .material-icons { font-size: 19px; }
.appbar-designer-status:hover {
    color: #f5f3ff;
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
}
.appbar-designer-state-dot {
    position: absolute;
    right: 4px; bottom: 4px;
    width: 7px; height: 7px;
    border: 2px solid #1e3a5f;
    border-radius: 50%;
    box-sizing: content-box;
}
.appbar-designer-status--online .appbar-designer-state-dot { background: #22c55e; }
.appbar-designer-status--disconnected .appbar-designer-state-dot { background: #ef4444; }
.appbar-designer-status--checking .appbar-designer-state-dot {
    background: #60a5fa;
    animation: pulse-badge .8s ease-in-out infinite;
}
.app-shell.app-dark .appbar-designer-state-dot { border-color: #0b1220; }
.appbar-designer-status:disabled { cursor: wait; opacity: .75; }
.appbar-project-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 230px; max-width: 300px;
    background: #1e3a5f;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.4);
    z-index: 2000;
    padding: 6px 0;
    overflow: hidden;
}
.appbar-project-dropdown-header {
    padding: 6px 14px 8px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: rgba(255,255,255,.45);
}
.appbar-project-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 12px;
    cursor: pointer;
    color: rgba(255,255,255,.85);
    font-size: .83rem;
    transition: background .1s;
}
.appbar-project-item:hover { background: rgba(255,255,255,.1); }
.appbar-project-item--active { color: white; font-weight: 600; background: rgba(255,255,255,.07); }
.appbar-project-item-avatar {
    width: 26px; height: 26px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: white; flex-shrink: 0;
}
.appbar-project-ado-badge {
    font-size: .63rem; font-weight: 700; letter-spacing: .04em;
    background: rgba(96,165,250,.25); color: #93c5fd;
    border-radius: 4px; padding: 1px 5px; flex-shrink: 0;
}

/* ── Dialog / form external labels ───────────────────────── */
.dlg-label { display: block; font-size: .75rem; font-weight: 600; color: rgba(0,0,0,0.55); margin-bottom: 3px; line-height: 1.4; }
.dlg-required { color: #ef4444; }
.dlg-hint { font-weight: 400; color: rgba(0,0,0,0.38); font-size: .72rem; }

/* ── AppBar navigation links ──────────────────────────────── */
.appbar-logo { color: white; font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap; margin-right: 16px; }
.appbar-board-nav { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
.appbar-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.appbar-nav-link { color: rgba(255,255,255,0.85); text-decoration: none; padding: 6px 10px; border-radius: 4px; font-size: .85rem; font-weight: 500; white-space: nowrap; transition: background .12s; }
.appbar-nav-link:hover { background: rgba(255,255,255,0.15); color: white; }
.appbar-nav-link--active { background: rgba(255,255,255,0.2); color: white; font-weight: 700; }
.appbar-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: white;
    cursor: pointer;
    flex-shrink: 0;
}
.appbar-menu-button .material-icons { font-size: 19px; color: white; }
.appbar-menu-button:hover,
.appbar-menu-button--open { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.42); }
.appbar-active-board-title {
    display: none;
    color: white;
    font-size: .88rem;
    font-weight: 750;
    max-width: min(30vw, 190px);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.appbar-board-menu-clickaway { display: none; }
.appbar-board-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 238px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(0,0,0,.42);
    z-index: 1002;
    overflow: hidden;
    animation: dropdown-in .15s ease;
}
.appbar-board-menu-header {
    padding: 10px 14px 7px;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.appbar-board-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 650;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.appbar-board-menu-item:last-child { border-bottom: none; }
.appbar-board-menu-item:hover { background: rgba(255,255,255,.1); color: white; }
.appbar-board-menu-item--active { background: rgba(96,165,250,.18); color: white; }
.appbar-board-menu-item .material-icons { font-size: 16px; color: #60a5fa; flex-shrink: 0; }

@media (max-width: 1400px) {
    .appbar-logo { margin-right: 6px; }
    .appbar-nav { display: none; }
    .appbar-menu-button,
    .appbar-active-board-title { display: inline-flex; }
    .appbar-board-menu-clickaway,
    .appbar-board-menu { display: block; }
}

@media (max-width: 760px) {
    .appbar-active-board-title,
    .appbar-search { display: none; }
    .appbar-project-selector { margin-right: 0; }
    .appbar-project-chip { padding: 5px; }
    .appbar-project-name,
    .appbar-project-switch-icon { display: none; }
}

@media (max-width: 480px) {
    .app-appbar { padding-inline: 8px; gap: 6px; }
    .appbar-logo { display: none; }
}

/* ── Sprint Board stacked cards ───────────────────────────── */
.sb-sprint-card { border: 1px solid #e2e8f0; border-radius: 10px; background: white; overflow: hidden; transition: box-shadow .15s; }
.sb-sprint-card--drop-target { border-color: #3b82f6 !important; box-shadow: 0 0 0 2px #3b82f680 !important; }
.sb-sprint-card--drop-target .sb-cards-area { background: #eff6ff; }
.sb-sprint-header { display: flex; align-items: flex-start; justify-content: flex-start; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.sb-sprint-title-area { display: flex; align-items: center; flex: 1; gap: 6px; min-width: 0; }
.sb-sprint-name { font-weight: 700; font-size: .95rem; }
.sb-sprint-name-input { font-weight: 700; font-size: .95rem; border: 1px solid #3b82f6; border-radius: 4px; padding: 2px 6px; outline: none; }
.sb-sprint-rename-btn { opacity: 0; transition: opacity .15s; }
.sb-sprint-header:hover .sb-sprint-rename-btn { opacity: 1; }
.sb-sprint-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sb-sprint-count { font-size: .75rem; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 10px; }
.sb-sprint-sp { font-size: .75rem; color: #3b82f6; font-weight: 600; }
.sb-sprint-progress { display:flex; align-items:center; justify-content:flex-end; gap:6px; padding:2px 16px 5px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.sb-sprint-progress--inline { flex:0 0 auto; margin-left:auto; padding:0; border:0; background:transparent; }
.sb-sprint-progress-track { width:96px; height:3px; flex:0 0 96px; overflow:hidden; border-radius:2px; background:#e2e8f0; }
.sb-sprint-progress-fill { height:100%; border-radius:2px; background:#10b981; transition:width .3s; }
.sb-sprint-progress-label { color:#64748b; font-size:.75rem; font-weight:600; line-height:1; white-space:nowrap; }
/* \u2500\u2500 Stats band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.sb-sprint-stats { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 4px 16px 6px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.sb-stat-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
.sb-stat-chip--date     { background: #f1f5f9; color: #475569; }
.sb-stat-chip--total    { background: #eff6ff; color: #2563eb; }
.sb-stat-chip--pending  { background: #fef3c7; color: #b45309; }
.sb-stat-chip--done     { background: #dcfce7; color: #16a34a; }
.sb-stat-chip--capacity { background: #f0fdf4; color: #15803d; }
.sb-stat-chip--effort   { background: #fdf4ff; color: #7e22ce; }
/* \u2500\u2500 Iteration summary band (two-row) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.sb-iter-summary { background: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 4px 14px 6px; display: flex; flex-direction: column; gap: 4px; }
.sb-iter-summary-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sb-iter-summary-label { font-size: .65rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.sb-iter-summary-sep { color: #cbd5e1; font-size: .75rem; margin: 0 2px; }
/* Priority count chips */
.sb-prio-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .65rem; font-weight: 600; padding: 2px 6px; border-radius: 9px; }
.sb-prio-chip strong { font-size: .72rem; }
.sb-prio-chip--1    { background: #fee2e2; color: #b91c1c; }
.sb-prio-chip--2    { background: #ffedd5; color: #c2410c; }
.sb-prio-chip--3    { background: #fef9c3; color: #854d0e; }
.sb-prio-chip--4    { background: #dcfce7; color: #166534; }
.sb-prio-chip--none { background: #f1f5f9; color: #64748b; }
.sb-cards-area { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; min-height: 80px; transition: background .15s; overflow: hidden; }
.sb-cards-area--drop-target { background: #eff6ff; }
.sb-cards-empty { color: #94a3b8; font-size: .8rem; font-style: italic; align-self: center; }
.sb-card { width: 180px; background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; cursor: pointer; transition: box-shadow .12s, transform .1s; border-top: 3px solid var(--type-color, #9ca3af); }
.sb-card--compact { width: 250px; padding: 6px 8px; border-radius: 6px; }
.sb-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateY(-1px); }
.sb-card--dragging { opacity: .4; transform: rotate(2deg); }
.sb-card-top { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.sb-card-type-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sb-card-type { font-size: .65rem; color: #64748b; flex: 1; }
.sb-card-id { font-size: .65rem; color: #94a3b8; }
.sb-card-title { font-size: .78rem; font-weight: 600; line-height: 1.3; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-card-title--sm { font-size: .72rem; margin-bottom: 5px; -webkit-line-clamp: 1; }
.sb-card-footer { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sb-state-badge { font-size: .62rem; padding: 2px 6px; border-radius: 8px; font-weight: 600; }
.sb-state-badge--xs { font-size: .58rem; padding: 1px 5px; flex-shrink: 0; white-space: nowrap; }
.sb-est-chip { font-size: .62rem; color: #3b82f6; font-weight: 600; cursor: pointer; padding: 1px 4px; border-radius: 4px; background: #eff6ff; min-width: 32px; text-align: center; }
.sb-est-chip:hover { background: #dbeafe; }
.sb-inline-num { width: 48px; font-size: .72rem; border: 1px solid #3b82f6; border-radius: 3px; padding: 1px 3px; }
.sb-assign-chip { cursor: pointer; display: flex; align-items: center; }

/* ── Plan Board two-column layout ────────────────────────────── */
/* Unplanned column: row-style list cards */
.sb-cards-area--col { flex-direction: column; gap: 6px; }
.sb-cards-area--col .sb-card { width: 100%; box-sizing: border-box; }
.sb-card--row { width: 100% !important; max-width: 100%; box-sizing: border-box; display: block; padding: 0 !important; overflow: hidden; }
.sb-card-row-summary { display: flex; flex-direction: column; padding: 6px 8px; cursor: pointer; gap: 4px; min-width: 0; overflow: hidden; }
.sb-card--expanded .sb-card-row-summary { border-bottom: 1px solid #e2e8f0; }
/* Row 1: type dot · id · title · chevron */
.sb-card-row1 { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: visible; }
.sb-card-title--row2 { font-size: .78rem; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
/* Row 2: state · SP · assignee */
.sb-card-row2 { display: flex; align-items: center; gap: 5px; padding-left: 14px; flex-wrap: wrap; min-width: 0; }
.sb-card-row-left { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sb-card-title--row { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.sb-card-row-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.sb-expand-btn { background: none; border: none; padding: 0 2px; cursor: pointer; display: flex; align-items: center; flex-shrink: 0; }
/* Expand/collapse detail panel */
.sb-card-details { padding: 8px 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 5px; }
.sb-detail-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sb-detail-label { font-size: .65rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.sb-detail-value { font-size: .75rem; color: #374151; }
.sb-detail-desc { font-size: .72rem; color: #475569; line-height: 1.4; border-top: 1px dashed #e2e8f0; padding-top: 5px; max-height: 120px; overflow-y: auto; }
/* Strip ADO inline background/color from expanded card description */
.sb-detail-desc [style*="background"],
.sb-detail-desc [style*="color"] { background: transparent !important; color: inherit !important; }
/* Ensure unplanned card rows don't inherit dark backgrounds */
.sb-card--row, .sb-card--row * { background-color: transparent; }
.sb-card--row { background-color: white !important; }

/* ── Kanban card sub-item badge ──────────────────────────────── */
/* \u2500\u2500 Unplanned column: priority groups \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.sb-prio-group { border-radius: 6px; margin-bottom: 6px; overflow: hidden; border: 1px solid #e2e8f0; transition: border-color .15s, background .15s; width: 100%; box-sizing: border-box; }
.sb-prio-group--drop { border-color: #3b82f6 !important; background: #eff6ff; }
.sb-prio-group-header { display: flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; user-select: none; }
.sb-prio-group-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sb-prio-group-label { font-size: .7rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .04em; flex: 1; }
.sb-prio-group .sb-card--row { border-radius: 0; border-left: none; border-right: none; border-top: none; border-bottom: 1px solid #f1f5f9; }
.sb-prio-group .sb-card--row:last-child { border-bottom: none; }
.jira-children-badge { display: inline-flex; align-items: center; gap: 2px; font-size: .62rem; color: #6366f1; background: #ede9fe; padding: 1px 5px; border-radius: 8px; font-weight: 600; cursor: pointer; user-select: none; transition: background .12s; }
.jira-children-badge:hover { background: #ddd6fe; }
.jira-children-badge--open { background: #c4b5fd; color: #4c1d95; }
.jira-card--expanded { outline: 1px solid #e0e7ff; }
.jira-card-children { border-top: 1px solid #f1f5f9; margin-top: 4px; padding-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.jira-child-row { display: flex; align-items: center; gap: 5px; padding: 3px 4px; border-radius: 4px; cursor: pointer; transition: background .1s; min-width: 0; }
.jira-child-row:hover { background: #f8fafc; }

/* ── Sprint Board & Backlog type pills ────────────────────── */
.sb-pill, .bl-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: .75rem; font-weight: 600; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; cursor: pointer; transition: background .1s, color .1s, border-color .1s; white-space: nowrap; }
.sb-pill:hover, .bl-pill:hover { background: #e2e8f0; border-color: #cbd5e1; }
.sb-pill--active { background: #1e3a5f; color: white; border-color: #162d4a; }
.bl-pill--active { background: #1e3a5f; color: white; border-color: #162d4a; }
.sb-type-pills, .backlog-type-pills { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }



/* ══ Radzen migration layout & utility classes ══════════════════════════ */

/* App shell layout */
.app-shell { display:flex; flex-direction:column; min-height:100vh; }
.app-appbar { display:flex; align-items:center; padding:0 16px; height:64px; background:#1e3a5f !important; position:fixed; top:0; left:0; right:0; z-index:100; gap:8px; }
.app-main { padding-top:64px; flex:1; }
.app-container { max-width:1600px; margin:0 auto; padding:16px 24px; }

/* ── Dark mode ─────────────────────────────────────────────────────────── */
.app-shell.app-dark {
    --rz-primary: #60a5fa;
    --rz-primary-darker: #3b82f6;
    --rz-primary-lighter: #93c5fd;
    --app-primary: #60a5fa;
    --app-primary-dark: #1d4ed8;
    --app-primary-light: #1e3a5f;
    --app-primary-text: #dbeafe;
    background: #0f172a;
    color: #e2e8f0;
}
.app-shell.app-dark .app-appbar { background:#0b1220 !important; border-bottom:1px solid #1e293b; }
.app-shell.app-dark .app-main,
.app-shell.app-dark .app-container { background:#0f172a; color:#e2e8f0; }
.app-shell.app-dark .rz-card,
.app-shell.app-dark .rz-panel,
.app-shell.app-dark .rz-dialog,
.app-shell.app-dark .rz-data-grid,
.app-shell.app-dark .rz-datatable,
.app-shell.app-dark .rz-fieldset,
.app-shell.app-dark .rz-accordion-content,
.app-shell.app-dark .rz-tabs-panel,
.app-shell.app-dark .modal-panel,
.app-shell.app-dark .side-drawer,
.app-shell.app-dark .search-detail-modal,
.app-shell.app-dark .appbar-search-dropdown,
.app-shell.app-dark .appbar-project-dropdown,
.app-shell.app-dark .appbar-user-dropdown {
    background:#111827 !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}
.app-shell.app-dark .rz-textbox,
.app-shell.app-dark .rz-textarea,
.app-shell.app-dark .rz-dropdown,
.app-shell.app-dark .rz-spinner,
.app-shell.app-dark .rz-numeric,
.app-shell.app-dark .rz-datepicker,
.app-shell.app-dark input,
.app-shell.app-dark textarea,
.app-shell.app-dark select {
    background:#0f172a !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}
.app-shell.app-dark .rz-dropdown-panel,
.app-shell.app-dark .rz-multiselect-panel,
.app-shell.app-dark .rz-context-menu,
.app-shell.app-dark .rz-selectable {
    background:#111827 !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}
.app-shell.app-dark .rz-dropdown-item:hover,
.app-shell.app-dark .rz-multiselect-item:hover,
.app-shell.app-dark .appbar-search-item:hover,
.app-shell.app-dark .appbar-project-item:hover {
    background:#1e293b !important;
}
.app-shell.app-dark .rz-button.rz-light,
.app-shell.app-dark .rz-button.rz-secondary {
    background:#1e293b !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}
.app-shell.app-dark .dlg-label,
.app-shell.app-dark label,
.app-shell.app-dark h1,
.app-shell.app-dark h2,
.app-shell.app-dark h3,
.app-shell.app-dark h4,
.app-shell.app-dark h5,
.app-shell.app-dark h6 { color:#f8fafc !important; }
.app-shell.app-dark .appbar-search-title,
.app-shell.app-dark .appbar-search-id,
.app-shell.app-dark .appbar-search-sublabel,
.app-shell.app-dark .appbar-user-dropdown-value { color:#e5e7eb !important; }
.app-shell.app-dark hr { border-color:#334155 !important; }
.app-shell.app-dark [style*="background:#fff"],
.app-shell.app-dark [style*="background: #fff"],
.app-shell.app-dark [style*="background:white"],
.app-shell.app-dark [style*="background: white"],
.app-shell.app-dark [style*="background:#f8fafc"],
.app-shell.app-dark [style*="background: #f8fafc"],
.app-shell.app-dark [style*="background:#f1f5f9"],
.app-shell.app-dark [style*="background: #f1f5f9"],
.app-shell.app-dark [style*="background:#f9fafb"],
.app-shell.app-dark [style*="background: #f9fafb"] {
    background:#111827 !important;
}
.app-shell.app-dark [style*="color:#374151"],
.app-shell.app-dark [style*="color: #374151"],
.app-shell.app-dark [style*="color:#475569"],
.app-shell.app-dark [style*="color: #475569"],
.app-shell.app-dark [style*="color:#64748b"],
.app-shell.app-dark [style*="color: #64748b"] {
    color:#cbd5e1 !important;
}

html.app-dark-root,
body.app-dark-body {
    background:#0f172a !important;
    color:#e5e7eb !important;
    color-scheme: dark;
}

body.app-dark-body .rz-dropdown-panel,
body.app-dark-body .rz-multiselect-panel,
body.app-dark-body .rz-context-menu,
body.app-dark-body .rz-tooltip,
body.app-dark-body .rz-dialog,
body.app-dark-body .rz-notification,
.app-shell.app-dark .ctx-menu-panel,
.app-shell.app-dark .detail-drawer,
.app-shell.app-dark .modal-panel,
.app-shell.app-dark .idea-so-panel,
.app-shell.app-dark .ideate-bulk-popup,
.app-shell.app-dark .idea-action-popup,
.app-shell.app-dark .search-detail-modal {
    background:#111827 !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
    box-shadow:0 18px 48px rgba(0,0,0,.55) !important;
}

body.app-dark-body .rz-dropdown-item,
body.app-dark-body .rz-multiselect-item,
body.app-dark-body .rz-context-menu-item,
body.app-dark-body .rz-dialog-titlebar,
.app-shell.app-dark .ctx-item,
.app-shell.app-dark .idea-popup-item,
.app-shell.app-dark .appbar-search-item,
.app-shell.app-dark .appbar-project-item,
.app-shell.app-dark .appbar-user-dropdown-section,
.app-shell.app-dark .appbar-user-dropdown-header {
    color:#e5e7eb !important;
    border-color:#334155 !important;
}

body.app-dark-body .rz-dropdown-item:hover,
body.app-dark-body .rz-multiselect-item:hover,
body.app-dark-body .rz-context-menu-item:hover,
.app-shell.app-dark .ctx-item:hover,
.app-shell.app-dark .idea-popup-item:hover,
.app-shell.app-dark .idea-card:hover,
.app-shell.app-dark .idea-card--expanded,
.app-shell.app-dark .idea-card--expanded:hover,
.app-shell.app-dark .appbar-search-item:hover {
    background:#1e293b !important;
    color:#f8fafc !important;
}

.app-shell.app-dark .sb-sprint-card,
.app-shell.app-dark .sb-card,
.app-shell.app-dark .sb-card--row,
.app-shell.app-dark .sb-prio-group,
.app-shell.app-dark .idea-card,
.app-shell.app-dark .rz-data-row,
.app-shell.app-dark .rz-datatable-data td,
.app-shell.app-dark .rz-grid-table td {
    background:#111827 !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}

.app-shell.app-dark .sb-sprint-header,
.app-shell.app-dark .sb-sprint-progress,
.app-shell.app-dark .sb-sprint-stats,
.app-shell.app-dark .sb-iter-summary,
.app-shell.app-dark .sb-prio-group-header,
.app-shell.app-dark .sb-card-details,
.app-shell.app-dark .ideate-bulk-popup-header,
.app-shell.app-dark .detail-drawer-header {
    background:#0f172a !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}

.app-shell.app-dark .sb-cards-area,
.app-shell.app-dark .sb-cards-area--drop-target,
.app-shell.app-dark .sb-card--expanded .sb-card-row-summary,
.app-shell.app-dark .idea-drop-zone--active,
.app-shell.app-dark .idea-card--selected {
    background:#172033 !important;
    border-color:#60a5fa !important;
}

.app-shell.app-dark .sb-card-title,
.app-shell.app-dark .sb-card-title--sm,
.app-shell.app-dark .sb-card-title--row,
.app-shell.app-dark .sb-card-title--row2,
.app-shell.app-dark .sb-sprint-name,
.app-shell.app-dark .idea-row-title,
.app-shell.app-dark .idea-card-title,
.app-shell.app-dark .appbar-search-title {
    color:#f8fafc !important;
}

.app-shell.app-dark .sb-card-type,
.app-shell.app-dark .sb-card-id,
.app-shell.app-dark .sb-sprint-count,
.app-shell.app-dark .sb-iter-summary-label,
.app-shell.app-dark .sb-detail-label,
.app-shell.app-dark .idea-card-desc,
.app-shell.app-dark .idea-desc-preview,
.app-shell.app-dark .idea-desc-panel,
.app-shell.app-dark .idea-desc-empty,
.app-shell.app-dark .ideate-cat-desc,
.app-shell.app-dark .ctx-section-label,
.app-shell.app-dark .dlg-hint,
.app-shell.app-dark .appbar-search-group-header,
.app-shell.app-dark .appbar-user-dropdown-label {
    color:#cbd5e1 !important;
}

.app-shell.app-dark .sb-detail-value,
.app-shell.app-dark .sb-detail-desc,
.app-shell.app-dark .work-item-description,
.app-shell.app-dark .desc-readonly {
    color:#e5e7eb !important;
    border-color:#334155 !important;
}

.app-shell.app-dark .desc-readonly::after {
    background:linear-gradient(transparent, #111827) !important;
}

.app-shell.app-dark .voice-btn,
.app-shell.app-dark .idea-action-btn,
.app-shell.app-dark .idea-kebab-btn,
.app-shell.app-dark .idea-cat-add-btn,
.app-shell.app-dark .ideate-bulk-trigger-btn,
.app-shell.app-dark .ideate-bulk-apply-btn,
.app-shell.app-dark .ideate-bulk-cancel-btn {
    background:#1e293b !important;
    color:#e5e7eb !important;
    border-color:#475569 !important;
}

.app-shell.app-dark .voice-btn:hover,
.app-shell.app-dark .idea-action-btn:hover,
.app-shell.app-dark .idea-kebab-btn:hover,
.app-shell.app-dark .idea-kebab-btn--open,
.app-shell.app-dark .idea-cat-add-btn:hover,
.app-shell.app-dark .ideate-bulk-trigger-btn:hover,
.app-shell.app-dark .ideate-bulk-apply-btn:hover:not([disabled]),
.app-shell.app-dark .ideate-bulk-cancel-btn:hover {
    background:#334155 !important;
    color:#f8fafc !important;
    border-color:#60a5fa !important;
}

.app-shell.app-dark .app-alert--info,
.app-shell.app-dark .voice-transcript-panel,
.app-shell.app-dark .voice-interim {
    background:#0c4a6e !important;
    color:#e0f2fe !important;
    border-color:#0284c7 !important;
}
.app-shell.app-dark .app-alert--warning { background:#713f12 !important; color:#fef3c7 !important; border-color:#b45309 !important; }
.app-shell.app-dark .app-alert--error { background:#7f1d1d !important; color:#fee2e2 !important; border-color:#dc2626 !important; }

.app-shell.app-dark .shimmer {
    background:linear-gradient(90deg,#111827 25%,#1e293b 50%,#111827 75%) !important;
    background-size:200% 100% !important;
}

.app-shell.app-dark .rz-html-editor,
.app-shell.app-dark .rz-html-editor iframe,
.app-shell.app-dark .html-editor-resizable {
    background:#0f172a !important;
    color:#e5e7eb !important;
    border-color:#334155 !important;
}

.app-shell.app-dark .rz-state-highlight,
body.app-dark-body .rz-state-highlight {
    background:#1d4ed8 !important;
    color:#ffffff !important;
}

/* ── AppBar Search ─────────────────────────────────────────────────────── */
.appbar-search { position:relative; }
.appbar-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 0 12px;
    height: 34px;
    width: 200px;
    transition: width .2s, background .15s, border-color .15s;
}
.appbar-search--open .appbar-search-box,
.appbar-search-box:focus-within {
    width: 320px;
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}
.appbar-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: .82rem;
    min-width: 0;
}
.appbar-search-input::placeholder { color: rgba(255,255,255,.55); }
.appbar-search-clear {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    font-size: .72rem;
    padding: 0 2px;
    line-height: 1;
}
.appbar-search-clear:hover { color: white; }
.appbar-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    border: 1px solid #e2e8f0;
    z-index: 500;
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
}
.appbar-search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
    transition: background .1s;
}
.appbar-search-item:last-child { border-bottom: none; }
.appbar-search-item:hover { background: #f0f9ff; }
.appbar-search-type-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.appbar-search-id { font-size:.72rem; color:#94a3b8; font-weight:600; white-space:nowrap; flex-shrink:0; }
.appbar-search-title { flex:1; font-size:.83rem; color:#1e293b; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.appbar-search-badge { font-size:.65rem; font-weight:700; padding:1px 6px; border-radius:8px; flex-shrink:0; }
.appbar-search-sublabel { font-size:.65rem; color:#64748b; padding:1px 5px; background:#f1f5f9; border-radius:6px; flex-shrink:0; }
.appbar-search-sync-badge { font-size:.6rem; font-weight:700; padding:1px 5px; border-radius:6px; background:#dbeafe; color:#1d4ed8; flex-shrink:0; }
.appbar-search-group-header { display:flex; align-items:center; gap:5px; padding:6px 14px 3px; font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#94a3b8; border-top:1px solid #f1f5f9; }
.appbar-search-group-header:first-child { border-top:none; }

/* ── Search Detail Modal ──────────────────────────────────────────────── */
.search-detail-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.45);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 80px;
}
.search-detail-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: min(680px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Alerts */
.app-alert { padding:10px 14px; border-radius:6px; font-size:.88rem; }
.app-alert--error { background:#fee2e2; color:#b91c1c; border:1px solid #fca5a5; }
.app-alert--info { background:#dbeafe; color:#1e3a5f; border:1px solid #93c5fd; }
.app-alert--warning { background:#fef3c7; color:#92400e; border:1px solid #fcd34d; }

/* Chips */
.chip { display:inline-flex; align-items:center; padding:2px 8px; border-radius:10px; font-size:.75rem; font-weight:600; }
.chip--green { background:#d1fae5; color:#065f46; }
.chip--secondary { background:#e0e7ff; color:#3730a3; }
.chip--outlined { background:transparent; border:1px solid currentColor; }

/* Links styled as buttons */
.btn-link { font-size:.83rem; color:var(--rz-primary,#1e3a5f); text-decoration:none; padding:3px 8px; border-radius:4px; border:1px solid currentColor; }
.btn-link:hover { opacity:.8; }

/* Context menus */
.ctx-menu-wrap { position:relative; display:inline-block; }
.ctx-menu-panel { position:absolute; right:0; top:100%; z-index:200; background:white; border:1px solid #e2e8f0; border-radius:6px; box-shadow:0 4px 12px rgba(0,0,0,.12); min-width:180px; padding:4px 0; }
.ctx-section-label { font-size:.7rem; font-weight:700; color:#9ca3af; text-transform:uppercase; padding:6px 12px 2px; letter-spacing:.04em; display:block; }
.ctx-item { display:block; width:100%; text-align:left; background:none; border:none; padding:6px 12px; font-size:.82rem; color:#374151; cursor:pointer; white-space:nowrap; }
.ctx-item:hover { background:#f3f4f6; }
.ctx-divider { border:none; border-top:1px solid #e5e7eb; margin:4px 0; }

/* Shimmer loading */
.shimmer { background:linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%); background-size:200% 100%; animation:shimmer 1.2s infinite; border-radius:6px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Detail drawer */
.detail-drawer { position:fixed; top:64px; right:0; width:460px; height:calc(100vh - 64px); background:white; box-shadow:-4px 0 20px rgba(0,0,0,.12); z-index:50; display:flex; flex-direction:column; overflow:hidden; transition:transform .2s; transform:translateX(0); }
.detail-drawer--closed { transform:translateX(100%); pointer-events:none; }
.detail-drawer-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid #e2e8f0; flex-shrink:0; }
.detail-drawer-body { flex:1; overflow-y:auto; padding:0 16px 24px; }

/* Plan Board list workspace */
.sb-view-switcher { display:flex; justify-content:flex-end; margin:0; }
.sb-view-switcher__button { width:34px; height:30px; border:1px solid #cbd5e1; background:#fff; color:#64748b; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.sb-view-switcher__button:first-child { border-radius:6px 0 0 6px; }
.sb-view-switcher__button:last-child { border-left:0; border-radius:0 6px 6px 0; }
.sb-view-switcher__button--active { background:#1e3a5f; border-color:#1e3a5f; color:#fff; }
.sb-plan-summary-header { margin-bottom:8px; padding:7px 10px; border:1px solid #c4b5fd; border-radius:8px; background:linear-gradient(135deg,#f5f3ff 0%,#ede9fe 100%); }
.sb-plan-summary-header__row { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.sb-plan-summary-header__identity { display:flex; align-items:center; gap:5px; flex-shrink:0; }
.sb-plan-summary-header__title { color:#4c1d95; font-size:.82rem; font-weight:750; }
.sb-plan-summary-header__count { padding:1px 6px; border-radius:8px; background:#ede9fe; color:#7c3aed; font-size:.64rem; font-weight:700; }
.sb-plan-summary-header__divider { width:1px; height:24px; flex-shrink:0; background:#c4b5fd; }
.sb-plan-summary-header__metric { display:flex; min-width:58px; flex-direction:column; align-items:center; line-height:1.1; }
.sb-plan-summary-header__metric small { color:#6b7280; font-size:.57rem; font-weight:650; text-transform:uppercase; }
.sb-plan-summary-header__metric strong { color:#0e7490; font-size:.86rem; font-weight:750; }
.sb-plan-summary-header__metric--capacity { color:#5b21b6 !important; }
.sb-plan-summary-header__progress { display:flex; align-items:center; gap:5px; flex:0 0 auto; }
.sb-plan-summary-header__progress-label { color:#7c3aed; font-size:.86rem; font-weight:750; line-height:1; white-space:nowrap; }
.sb-plan-summary-header__progress-track { width:72px; height:3px; flex:0 0 72px; overflow:hidden; border-radius:2px; background:#ddd6fe; }
.sb-plan-summary-header__progress-fill { height:100%; border-radius:2px; background:#7c3aed; transition:width .3s; }
.sb-plan-summary-header__track { display:flex; align-items:center; gap:4px; flex-shrink:0; padding:3px 8px; border:1px solid; border-radius:14px; }
.sb-plan-summary-header__track span { font-size:.7rem; font-weight:700; }
.sb-plan-summary-header__spacer { flex:1; }
.sb-plan-summary-header__actions { display:flex; max-width:100%; align-items:center; justify-content:flex-end; gap:3px; flex-wrap:wrap; margin-left:auto; }
.sb-plan-summary-header__actions .rz-button { width:28px; min-width:28px; height:28px; padding:0; }
.sb-plan-summary-header__actions .sb-view-switcher__button { width:28px; height:28px; }
.sb-plan-summary-header__filters { display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; margin-top:6px; padding-top:6px; border-top:1px solid #c4b5fd; }
.sb-list-workspace { display:flex; height:calc(100vh - 160px); min-height:560px; border:1px solid #cbd5e1; background:#fff; }
.sb-list-workspace__nav { display:flex; flex:0 0 auto; flex-direction:column; width:40%; min-width:280px; background:#fff; }
.sb-list-workspace__resizer { position:relative; width:8px; flex:0 0 8px; padding:0; border:0; border-right:1px solid #cbd5e1; border-left:1px solid #cbd5e1; background:#e2e8f0; cursor:col-resize; touch-action:none; }
.sb-list-workspace__resizer::after { position:absolute; top:50%; left:50%; width:2px; height:36px; border-radius:2px; background:#94a3b8; content:""; transform:translate(-50%, -50%); }
.sb-list-workspace__resizer:hover,
.sb-list-workspace__resizer:focus-visible,
.sb-list-workspace__resizer.plan-workspace-resizer--active { background:#bfdbfe; outline:none; }
.sb-list-workspace__tools { display:flex; align-items:center; gap:8px; padding:10px; border-bottom:1px solid #e2e8f0; }
.sb-list-workspace__tools input { min-width:0; flex:1; }
.sb-list-workspace__tools span { color:#64748b; font-size:.72rem; }
.sb-list-workspace__group-actions { display:flex; flex:0 0 auto; gap:3px; }
.sb-list-workspace__group-actions button { display:grid; width:28px; height:28px; padding:0; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#475569; cursor:pointer; place-items:center; }
.sb-list-workspace__group-actions button:hover:not(:disabled) { border-color:#94a3b8; background:#f1f5f9; color:#1d4ed8; }
.sb-list-workspace__group-actions button:focus-visible { outline:2px solid #2563eb; outline-offset:1px; }
.sb-list-workspace__group-actions button:disabled { cursor:not-allowed; opacity:.4; }
.sb-list-workspace__group-actions .rz-icon { font-size:1rem; }
.sb-list-workspace__groups { flex:1; overflow:auto; background:#f8fafc; }
.sb-list-workspace__group { border-bottom:1px solid #cbd5e1; }
.sb-list-workspace__group-header { display:flex; align-items:center; min-height:38px; gap:6px; padding-right:7px; background:#eef2f7; }
.sb-list-workspace__group-toggle { display:flex; align-items:center; min-width:0; min-height:38px; flex:1; gap:6px; padding:7px 10px; border:0; background:transparent; color:#334155; cursor:pointer; font:inherit; text-align:left; }
.sb-list-workspace__group-toggle:hover { background:#e2e8f0; }
.sb-list-workspace__group-toggle .rz-icon { flex:0 0 auto; color:#64748b; font-size:1rem; }
.sb-list-workspace__group-toggle strong { min-width:0; overflow:hidden; flex:1; font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.sb-list-workspace__group-toggle > span:last-child { min-width:22px; padding:1px 6px; border-radius:10px; background:#d7dee8; color:#475569; font-size:.65rem; font-weight:700; text-align:center; }
.sb-list-workspace__refine { flex:0 0 auto; white-space:nowrap; }
.sb-list-workspace__items { display:flex; flex-direction:column; gap:7px; padding:8px; }
.sb-list-workspace__row { display:flex; flex-direction:column; width:100%; min-height:104px; gap:8px; padding:10px 11px; border:1px solid #dbe3ed; border-radius:6px; background:#fff; color:#475569; cursor:pointer; font:inherit; text-align:left; transition:border-color 120ms ease, box-shadow 120ms ease, background 120ms ease; }
.sb-list-workspace__row:hover { border-color:#94a3b8; background:#f8fafc; box-shadow:0 2px 6px rgb(15 23 42 / 8%); }
.sb-list-workspace__row--selected { border-color:#2563eb; box-shadow:inset 3px 0 #2563eb; background:#eff6ff; }
.sb-list-workspace__row-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.sb-list-workspace__row-heading small { color:#64748b; font-size:.64rem; font-weight:700; }
.sb-list-workspace__type { max-width:55%; overflow:hidden; padding:2px 6px; border:1px solid #cbd5e1; border-radius:4px; background:#f8fafc; color:#475569; font-size:.61rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.sb-list-workspace__title { min-width:0; }
.sb-list-workspace__title strong { display:-webkit-box; overflow:hidden; color:#172033; font-size:.8rem; line-height:1.3; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.sb-list-workspace__meta { display:grid; grid-template-columns:minmax(0, .8fr) minmax(0, 1.2fr); gap:10px; padding-top:7px; border-top:1px solid #e2e8f0; }
.sb-list-workspace__field { display:flex; min-width:0; flex-direction:column; gap:2px; }
.sb-list-workspace__field small { color:#64748b; font-size:.58rem; font-weight:750; text-transform:uppercase; }
.sb-list-workspace__field > span { min-width:0; overflow:hidden; font-size:.7rem; text-overflow:ellipsis; white-space:nowrap; }
.sb-list-workspace__status { color:#1d4ed8; font-weight:700; }
.sb-list-workspace__group-empty { padding:14px; color:#94a3b8; font-size:.7rem; text-align:center; }
.sb-list-workspace__detail { min-width:0; flex:1; overflow:auto; padding:12px; }
.sb-list-workspace__empty { display:flex; align-items:center; justify-content:center; gap:8px; padding:28px; color:#64748b; font-size:.8rem; }
.sb-list-workspace__empty--detail { height:100%; flex-direction:column; }

.app-shell.app-dark .sb-list-workspace,
.app-shell.app-dark .sb-list-workspace__nav,
.app-shell.app-dark .sb-list-workspace__row { border-color:var(--app-dark-border); background:var(--app-dark-surface); }
.app-shell.app-dark .sb-list-workspace__group-actions button { border-color:var(--app-dark-border); background:var(--app-dark-surface); color:var(--app-dark-muted); }
.app-shell.app-dark .sb-list-workspace__group-actions button:hover:not(:disabled) { background:var(--app-dark-hover); color:var(--app-dark-title); }
.app-shell.app-dark .sb-list-workspace__groups { background:var(--app-dark-bg); }
.app-shell.app-dark .sb-list-workspace__group { border-color:var(--app-dark-border); }
.app-shell.app-dark .sb-list-workspace__group-header { background:var(--app-dark-surface-2); }
.app-shell.app-dark .sb-list-workspace__group-toggle { color:var(--app-dark-title); }
.app-shell.app-dark .sb-list-workspace__group-toggle:hover { background:var(--app-dark-hover); }
.app-shell.app-dark .sb-list-workspace__title strong { color:var(--app-dark-title); }
.app-shell.app-dark .sb-list-workspace__row--selected { border-color:#60a5fa; background:#172d4f; }

@media (max-width: 900px) {
    .sb-list-workspace { flex-direction:column; height:auto; min-height:calc(100vh - 150px); }
    .sb-list-workspace__nav { width:auto !important; height:42vh; min-height:280px; border-bottom:1px solid #cbd5e1; }
    .sb-list-workspace__resizer { display:none; }
    .sb-list-workspace__detail { min-height:56vh; }
}
.drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,.2); z-index:49; }

/* Utility spacing */
.mb-1 { margin-bottom:4px!important; }
.mb-2 { margin-bottom:8px!important; }
.mb-3 { margin-bottom:12px!important; }
.mb-4 { margin-bottom:16px!important; }
.mt-1 { margin-top:4px!important; }
.mt-2 { margin-top:8px!important; }
.mt-3 { margin-top:12px!important; }
.mt-4 { margin-top:16px!important; }
.w-100 { width:100%!important; }

/* ═══════════════════════════════════════════════════
   IDEATE BOARD
═══════════════════════════════════════════════════ */

/* Ensure toolbar dropdowns overlay content correctly */
.ideate-toolbar {
    position: relative;
    z-index: 10;
}
.ideate-toolbar .rz-dropdown {
    z-index: 20;
}
.ideate-toolbar .rz-dropdown-panel {
    z-index: 1000 !important;
}

/* Category description bar */
.ideate-cat-desc {
    font-size: .78rem;
    color: #64748b;
    font-style: italic;
    margin: 4px 0 0;
    padding: 0;
}

.idea-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    border-left: 3px solid var(--prio-color, #3b82f6);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow .15s;
}
.idea-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.idea-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
}
.idea-prio-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.idea-status-badge {
    font-size: .68rem; font-weight: 700; padding: 1px 6px;
    border-radius: 99px; text-transform: uppercase; letter-spacing: .04em;
}
.idea-card-title {
    font-weight: 600; font-size: .9rem; line-height: 1.3;
}
.idea-card-desc {
    font-size: .8rem; color: #64748b; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.idea-tags {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.idea-tag {
    font-size: .68rem; background: #f1f5f9; color: #475569;
    border-radius: 99px; padding: 1px 8px; font-weight: 600;
}
.idea-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Initiator chip in footer */
.idea-initiator {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.idea-initiator-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    font-size: .6rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}
.idea-initiator-name {
    font-size: .72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

/* ═══════════════════════════════════════════════════
   IDEATE — ROW LIST LAYOUT (matches backlog row style)
═══════════════════════════════════════════════════ */

/* ── Category header (collapsible) */
.idea-cat-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px; padding: 6px 10px;
    background: linear-gradient(90deg, rgba(30,58,95,.07) 0%, transparent 100%);
    border-left: 3px solid #1e3a5f; border-radius: 0 6px 6px 0;
    cursor: pointer; user-select: none;
    transition: background .12s;
}
.idea-cat-header:hover { background: linear-gradient(90deg, rgba(30,58,95,.13) 0%, transparent 100%); }
.idea-cat-chevron { font-size: 16px !important; color: #64748b; flex-shrink: 0; }
.idea-cat-name {
    font-size: .8rem; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: #1e3a5f;
}
.idea-cat-badge {
    background: rgba(30,58,95,.12); border: 1px solid rgba(30,58,95,.2);
    border-radius: 99px; padding: 1px 9px;
    font-size: .7rem; font-weight: 700; color: #1e3a5f;
}

.idea-list {
    border-left: 3px solid transparent;
    overflow: hidden;
}

/* ── Idea card wrapper (replaces flat row — wraps top-row + desc panel) */
.idea-card {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    padding: 0;
    transition: background .1s;
    background: transparent;
    box-shadow: none;
}
.idea-card:last-child { border-bottom: none; }
.idea-card:hover { background: #f8fafc; }
.idea-card--dimmed { opacity: 0.6; }
.idea-card--expanded { background: #fafcff; }
.idea-card--expanded:hover { background: #fafcff; }

/* ── Row structure */
.idea-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 2px;
    cursor: pointer;
    user-select: none;
}
/* Main row: title left, meta+status+actions right */
.idea-row--main { padding: 3px 2px 2px; min-height: 26px; }
/* Description preview row: indented, 2-line clamp */
.idea-row--preview {
    padding: 0 2px 2px 6px;
    cursor: pointer;
}
.idea-desc-preview {
    font-size: .82rem;  /* 13px */
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

/* ── Full description panel (expanded) */
.idea-desc-panel {
    padding: 1px 2px 4px 6px;
    font-size: .875rem;
    color: #374151;
    line-height: 1.5;
    border-top: 1px solid #f1f5f9;
}
.idea-desc-panel > * { max-width: 100%; }
.idea-desc-empty {
    font-style: italic; color: #94a3b8; font-size: .8rem;
}

/* Column sizing */
.idea-col-expand    { width: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #94a3b8; }
.idea-col-prio      { width: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.idea-col-title     { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.idea-col-status    { flex-shrink: 0; }
.idea-col-tags      { display: none; }
.idea-col-cat       { display: none; }
.idea-col-initiator { width: 20px; flex-shrink: 0; display: flex; justify-content: center; }
.idea-col-time      { width: 48px; flex-shrink: 0; text-align: right; }
.idea-col-actions   { flex-shrink: 0; display: flex; align-items: center; gap: 0; }

/* ── Icon-only action buttons — doubled in size */
.idea-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: #94a3b8;
    transition: all .12s;
    padding: 0;
}
.idea-action-btn:hover { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.idea-action-btn--danger { color: #dc2626; }
.idea-action-btn--danger:hover { background: #fee2e2; color: #9f1239; border-color: #fecdd3; }
    flex-shrink: 0;
}
.idea-action-btn:hover             { background: #f1f5f9; color: #475569; }
.idea-action-btn--edit:hover       { background: #e0f2fe; color: #0369a1; }
.idea-action-btn--merge:hover      { background: #f0fdf4; color: #15803d; }
.idea-action-btn--promote:hover    { background: #faf5ff; color: #7c3aed; }
.idea-action-btn--delete:hover     { background: #fff1f2; color: #be123c; }
.idea-action-btn--danger           { background: #fff1f2; color: #be123c; border-color: #fecdd3; }

/* ── Idea card kebab (⋮) menu button ──────────────────────────────────────── */
.idea-kebab-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px;
    border: 1px solid transparent; background: transparent;
    color: #94a3b8; cursor: pointer;
    transition: all .12s; padding: 0; flex-shrink: 0;
}
.idea-kebab-btn:hover, .idea-kebab-btn--open {
    background: #f1f5f9; color: #475569;
    border-color: #e2e8f0;
}
.idea-action-popup {
    position: absolute; right: 0; top: calc(100% + 4px);
    min-width: 170px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    z-index: 500;
    padding: 4px 0;
    overflow: hidden;
}
.idea-popup-item {
    display: flex; align-items: center; gap: 9px;
    width: 100%; padding: 9px 14px;
    background: none; border: none;
    font-size: .84rem; color: #334155;
    cursor: pointer; text-align: left;
    transition: background .1s;
}
.idea-popup-item:hover              { background: #f8fafc; }
.idea-popup-item--edit:hover        { background: #e0f2fe; color: #0369a1; }
.idea-popup-item--promote:hover     { background: #faf5ff; color: #7c3aed; }
.idea-popup-item--delete            { color: #dc2626; }
.idea-popup-item--delete:hover      { background: #fff1f2; }
.idea-popup-item--danger            { color: #dc2626; font-weight: 700; }
.idea-popup-item--danger:hover      { background: #fee2e2; }
.idea-popup-divider {
    height: 1px; background: #f1f5f9; margin: 3px 0;
}

/* ── Category header "+ add" button */
.idea-cat-add-btn {
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    cursor: pointer;
    color: #64748b;
    transition: all .12s;
    padding: 0;
}
.idea-cat-add-btn:hover { background: #f59e0b; color: #fff; border-color: #f59e0b; }

.idea-row-title {
    font-size: .9375rem; /* 15px — well above 12px minimum */
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.idea-cat-chip {
    font-size: .7rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    padding: 1px 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* ─── Modal overlay ──────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
.modal-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

/* ─── Plan refinement review ────────────────────── */
.refine-plan-modal {
    width: min(1120px, 97vw);
    max-width: 1120px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}
.refine-plan-header,
.refine-plan-title,
.refine-plan-actions,
.refine-item-header,
.refine-plan-toolbar {
    display: flex;
    align-items: center;
}
.refine-plan-header {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.refine-plan-title { gap: 8px; min-width: 0; }
.refine-plan-title strong { font-size: 1rem; color: #1e293b; }
.refine-plan-title span,
.refine-plan-toolbar { font-size: .75rem; color: #64748b; }
.refine-plan-actions,
.refine-plan-toolbar { gap: 6px; flex-wrap: wrap; }
.refine-plan-content { overflow-y: auto; flex: 1; min-height: 0; }
.refine-plan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
    color: #64748b;
    font-size: .85rem;
}
.refine-plan-toolbar { padding: 6px 0 10px; border-bottom: 1px solid #e2e8f0; }
.refine-section-title { margin: 16px 0 8px; font-size: .82rem; font-weight: 700; color: #334155; }
.refine-list { display: grid; gap: 10px; }
.refine-item { padding: 12px; border: 1px solid #dbe3ec; border-radius: 6px; background: #fff; }
.refine-item--selected { border-color: #67b39b; box-shadow: inset 3px 0 #16836b; }
.refine-item-header { gap: 7px; flex-wrap: wrap; color: #1e293b; font-size: .85rem; }
.refine-item-header strong { min-width: 0; overflow-wrap: anywhere; }
.refine-analysis {
    display: grid;
    gap: 5px;
    margin: 10px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border-left: 3px solid #38bdf8;
    font-size: .75rem;
    color: #475569;
}
.refine-analysis-label { display: inline-block; margin-right: 7px; color: #0369a1; font-weight: 700; }
.refine-analysis-label--warning { color: #a16207; }
.refine-analysis-label--gap { color: #b45309; }
.refine-compare-grid,
.refine-child-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.refine-item label { display: block; margin: 8px 0 4px; font-size: .7rem; font-weight: 700; color: #64748b; }
.refine-current {
    min-height: 76px;
    max-height: 180px;
    margin: 0;
    padding: 8px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font: .75rem/1.45 monospace;
}
.refine-textarea { min-height: 142px; resize: vertical; font-family: monospace; font-size: .75rem; line-height: 1.45; }
.refine-parent-link { color: #64748b; font-size: .72rem; }
.refine-child-rationale { margin: 8px 0 2px; color: #64748b; font-size: .76rem; }
.refine-child-rationale .rz-icon { color: #d97706; font-size: .9rem; vertical-align: middle; }
.work-item-refine-dialog { display: flex; min-height: 0; flex-direction: column; gap: 12px; }
.work-item-refine-dialog .refine-item-header { margin-bottom: 2px; }
.work-item-refine-dialog__comparison { min-height: 0; overflow-y: auto; }
.work-item-refine-dialog__comparison label { display: block; margin: 0 0 4px; color: #64748b; font-size: .7rem; font-weight: 700; }
.work-item-refine-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }
.work-item-refine-button { display:inline-flex; width:30px; height:28px; align-items:center; justify-content:center; padding:0; border:1px solid #fde68a; border-radius:4px; background:#fef3c7; color:#92400e; box-shadow:0 1px 2px rgb(15 23 42 / 16%); cursor:pointer; }
.work-item-refine-button:hover,
.work-item-refine-button:focus-visible { border-color:#f59e0b; background:#fde68a; color:#78350f; outline:2px solid rgb(255 255 255 / 80%); outline-offset:1px; }
.work-item-refine-button:disabled { cursor:wait; opacity:.65; }
@media (max-width: 760px) {
    .refine-plan-header { align-items: flex-start; flex-wrap: wrap; }
    .refine-plan-actions { width: 100%; flex-wrap: wrap; }
    .refine-compare-grid,
    .refine-child-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Resizable HTML editor wrapper ─────────────────────────────────────────
   Wrap RadzenHtmlEditor in <div class="html-editor-resizable"> to let the user
   drag the bottom-right handle to resize the editor vertically.
   The inner .rz-html-editor iframe is forced to fill the wrapper height.       */
.html-editor-resizable {
    resize: vertical;
    overflow: hidden;
    min-height: 120px;
    border-radius: 6px;
}
.html-editor-resizable .rz-html-editor,
.html-editor-resizable .rz-html-editor-content {
    height: 100% !important;
}

/* ─── Expandable read-only description ─────────────────────────────────────
   .desc-readonly — collapsed (max 5 lines), .desc-readonly--expanded — full   */
.desc-readonly {
    max-height: 7.5em;   /* ~5 lines at .85rem/1.5 line-height */
    overflow: hidden;
    position: relative;
    line-height: 1.5;
    font-size: .85rem;
    transition: max-height .25s ease;
    cursor: pointer;
}
.desc-readonly::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.5em;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}
.desc-readonly--expanded {
    max-height: 600px;
    cursor: default;
}
.desc-readonly--expanded::after { display: none; }
.desc-readonly-toggle {
    display: inline-block;
    margin-top: 2px;
    font-size: .72rem;
    color: #2563a8;
    cursor: pointer;
    user-select: none;
}
.desc-readonly-toggle:hover { text-decoration: underline; }

/* ─── Idea Edit Slide-out Drawer ─────────────────────────────────────────── */
.idea-so-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.idea-so-backdrop--open { opacity: 1; pointer-events: all; }

.idea-so-panel {
    position: fixed; top: 0; right: 0; height: 100%;
    width: 560px;
    max-width: 95vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1100;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
}
.idea-so-panel--open { transform: translateX(0); }

.idea-so-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.idea-so-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.idea-so-body { flex: 1 0 auto; }

.idea-so-delete-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 32px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
}

/* ─── Drag-over drop zone ─────────────────────────────────────────────────── */
.idea-drop-zone--active {
    background: #eff6ff;
    border-radius: 8px;
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}
.idea-card--selected {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    background: #eff6ff !important;
}
/* ── Bulk edit trigger button ──────────────────────────────────────────────── */
.ideate-bulk-trigger-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f1f5f9; color: #1e3a5f;
    border: 1px solid #cbd5e1; border-radius: 6px;
    padding: 0 8px; height: 32px; font-size: .8rem; font-weight: 600;
    cursor: pointer; transition: background .13s, color .13s, border-color .13s;
    position: relative;
}
.ideate-bulk-trigger-btn:hover { background: #1e3a5f; color: white; border-color: #1e3a5f; }
.ideate-bulk-trigger-btn:hover .ideate-bulk-trigger-badge { background: white; color: #1e3a5f; }
.ideate-bulk-trigger-badge {
    background: #1e3a5f; color: white;
    border-radius: 99px; padding: 0 5px;
    font-size: .68rem; font-weight: 800; line-height: 16px;
    min-width: 16px; text-align: center;
}

/* ── Bulk edit popup ───────────────────────────────────────────────────────── */
.ideate-bulk-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1100;
}
.ideate-bulk-popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 1101;
    background: white; border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,.22);
    width: 420px; max-width: calc(100vw - 32px);
    overflow: hidden;
}
.ideate-bulk-popup-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    background: #f0f5ff;
    border-bottom: 1px solid #e0e8ff;
    font-size: .9rem; font-weight: 600; color: #1e3a5f;
}
.ideate-bulk-popup-close {
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; width: 28px; height: 28px; border-radius: 6px;
    border: none; background: none; color: #64748b; cursor: pointer;
    transition: background .1s;
}
.ideate-bulk-popup-close:hover { background: #e2e8f0; }
.ideate-bulk-popup-body {
    padding: 18px 18px 12px;
    display: flex; flex-direction: column; gap: 14px;
}
.ideate-bulk-field { display: flex; flex-direction: column; gap: 5px; }
.ideate-bulk-label {
    font-size: .72rem; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: .04em;
}
.ideate-bulk-popup-footer {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 12px 18px 16px;
    border-top: 1px solid #f1f5f9;
}
.ideate-bulk-apply-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: #f1f5f9; color: #1e3a5f;
    border: 1px solid #cbd5e1; border-radius: 6px;
    cursor: pointer; transition: background .13s, color .13s, border-color .13s; flex-shrink: 0;
}
.ideate-bulk-apply-btn:hover:not([disabled]) { background: #1e3a5f; color: white; border-color: #1e3a5f; }
.ideate-bulk-apply-btn[disabled] { opacity: .4; cursor: default; }
.ideate-bulk-delete-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: #fee2e2; border: 1px solid #fca5a5; color: #be123c;
    border-radius: 6px; flex-shrink: 0;
    cursor: pointer; transition: background .1s, color .1s, border-color .1s;
}
.ideate-bulk-delete-btn:hover { background: #be123c; color: white; border-color: #be123c; }
.ideate-bulk-cancel-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: #f1f5f9; border: 1px solid #cbd5e1; color: #1e3a5f;
    border-radius: 6px; flex-shrink: 0;
    cursor: pointer; transition: background .1s, color .1s;
}
.ideate-bulk-cancel-btn:hover { background: #1e3a5f; color: white; border-color: #1e3a5f; }

/* ─── Voice input button ──────────────────────────────────────────────────── */
.voice-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    color: #64748b;
    transition: all .15s;
    flex-shrink: 0;
    padding: 0;
}
.voice-btn:hover { background: #f1f5f9; }
.voice-btn--active {
    background: #fef2f2; border-color: #ef4444; color: #ef4444;
    animation: voice-pulse 1s ease-in-out infinite;
}
.voice-btn--processing { background: #f0fdf4; border-color: #22c55e; color: #22c55e; }
@keyframes voice-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}
@keyframes sol-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
    50%       { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}
@keyframes sol-popup-in {
    from { opacity:0; transform: scale(.96) translateY(8px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.voice-interim {
    font-size: .72rem; color: #6366f1; font-style: italic;
    padding: 4px 8px; background: #eef2ff; border-radius: 4px;
    margin-bottom: 8px;
}
.voice-transcript-panel {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 6px;
    padding: 8px 10px; margin-bottom: 10px; font-size: .78rem;
    min-height: 40px; line-height: 1.6; color: #0c4a6e;
    word-break: break-word;
}
.voice-transcript-final  { color: #0c4a6e; }
.voice-transcript-interim { color: #6366f1; font-style: italic; }
.voice-transcript-status  { display: block; color: #f59e0b; font-weight: 600; margin-top: 4px; }
.voice-field-highlight    { animation: voice-field-flash 1.5s ease both; }
@keyframes voice-field-flash {
    0%, 100% { background: transparent; }
    20%,  80% { background: #fef3c7; color: #92400e; border-radius: 3px; padding: 0 4px; }
}

/* ── Blazor reconnect modal — suppress transient flashes ─────────────────────
   Blazor adds .components-reconnect-show during the normal pre-render→interactive
   circuit handoff (lasts ~0.5-1s). Using animation-delay means the modal stays
   invisible during that brief window. If a real disconnection lasts >4s it fades
   in normally. Failed/rejected states bypass the delay and show immediately. */
#components-reconnect-modal {
    opacity: 0;
    pointer-events: none;
}
#components-reconnect-modal.components-reconnect-show {
    animation: reconnect-delay-show 0.4s ease-in 4s forwards;
}
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: none !important;
}
@keyframes reconnect-delay-show {
    to { opacity: 1; pointer-events: auto; }
}

/* ── User Profile Dropdown ──────────────────────────────────────────────────── */
.appbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    color: white;
    font-weight: 700;
    font-size: .95rem;
    border: 2px solid rgba(255,255,255,.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    transition: background .15s;
    flex-shrink: 0;
}
.appbar-user-avatar:hover { background: rgba(255,255,255,.35); }

.appbar-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    z-index: 1002;
    overflow: hidden;
    animation: dropdown-in .15s ease;
}

.appbar-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: white;
}

.appbar-user-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.appbar-user-dropdown-section {
    padding: 10px 16px 6px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.appbar-user-dropdown-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 5px;
}

.appbar-user-dropdown-value {
    font-size: .82rem;
    color: #cbd5e1;
    margin-bottom: 3px;
}

.appbar-user-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 700;
}
.appbar-user-role-badge--admin     { background: #fef9c3; color: #a16207; }
.appbar-user-role-badge--superuser { background: #ede9fe; color: #6d28d9; }
.appbar-user-role-badge--contributor{ background: #dbeafe; color: #1e3a5f; }
.appbar-user-role-badge--reader    { background: #f1f5f9; color: #64748b; }

.appbar-user-dropdown-footer {
    padding: 10px 16px 12px;
}

.appbar-user-signout {
    width: 100%;
    background: rgba(239,68,68,.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.25);
    border-radius: 8px;
    padding: 7px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.appbar-user-signout:hover { background: rgba(239,68,68,.28); }

/* ─── Global Radzen button theme ─────────────────────────────────────────
   All buttons: gray background (#f1f5f9), blue text/icon (#1e3a5f)
   Hover/focus: reverses to blue background + white text
   Exceptions:  Danger keeps red tones
   ────────────────────────────────────────────────────────────────────── */

/* --- Base: every button variant defaults to gray+blue --- */
.rz-button {
    background-color: #f1f5f9 !important;
    color: #1e3a5f !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    transition: background-color .15s, color .15s, border-color .15s !important;
}
.rz-button .rzi,
.rz-button .rz-button-text {
    color: #1e3a5f !important;
}

/* Hover / focus-visible */
@media (hover: hover) and (pointer: fine) {
    .rz-button:not(.rz-state-disabled):not(:active):hover {
        background-color: #1e3a5f !important;
        color: #ffffff !important;
        border-color: #1e3a5f !important;
        background-image: none !important;
        box-shadow: none !important;
    }
    .rz-button:not(.rz-state-disabled):not(:active):hover .rzi,
    .rz-button:not(.rz-state-disabled):not(:active):hover .rz-button-text {
        color: #ffffff !important;
    }
}
.rz-button:not(.rz-state-disabled):not(:active):focus-visible {
    background-color: #1e3a5f !important;
    color: #ffffff !important;
    border-color: #1e3a5f !important;
    background-image: none !important;
    box-shadow: none !important;
}
.rz-button:not(.rz-state-disabled):not(:active):focus-visible .rzi,
.rz-button:not(.rz-state-disabled):not(:active):focus-visible .rz-button-text {
    color: #ffffff !important;
}

/* Active/pressed */
.rz-button:not(.rz-state-disabled):active {
    background-color: #162d4a !important;
    color: #ffffff !important;
    border-color: #162d4a !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Disabled */
.rz-button.rz-state-disabled {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* --- Danger: keep red tones, override the base rule above --- */
.rz-button.rz-danger,
.rz-button.rz-error {
    background-color: #fee2e2 !important;
    color: #be123c !important;
    border-color: #fecdd3 !important;
}
.rz-button.rz-danger .rzi,
.rz-button.rz-danger .rz-button-text,
.rz-button.rz-error .rzi,
.rz-button.rz-error .rz-button-text {
    color: #be123c !important;
}
@media (hover: hover) and (pointer: fine) {
    .rz-button.rz-danger:not(.rz-state-disabled):not(:active):hover,
    .rz-button.rz-error:not(.rz-state-disabled):not(:active):hover {
        background-color: #be123c !important;
        color: #ffffff !important;
        border-color: #be123c !important;
    }
    .rz-button.rz-danger:not(.rz-state-disabled):not(:active):hover .rzi,
    .rz-button.rz-danger:not(.rz-state-disabled):not(:active):hover .rz-button-text,
    .rz-button.rz-error:not(.rz-state-disabled):not(:active):hover .rzi,
    .rz-button.rz-error:not(.rz-state-disabled):not(:active):hover .rz-button-text {
        color: #ffffff !important;
    }
}
.rz-button.rz-danger:not(.rz-state-disabled):active,
.rz-button.rz-error:not(.rz-state-disabled):active {
    background-color: #9f1239 !important;
    color: #ffffff !important;
    border-color: #9f1239 !important;
}

/* ─── AppBar buttons: white-on-dark override ──────────────────────────── */
.app-appbar .rz-button {
    background-color: transparent !important;
    background-image: none !important;
    color: rgba(255,255,255,0.85) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.app-appbar .rz-button .rzi,
.app-appbar .rz-button .rz-button-text {
    color: rgba(255,255,255,0.85) !important;
}
@media (hover: hover) and (pointer: fine) {
    .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover {
        background-color: rgba(255,255,255,0.15) !important;
        color: #ffffff !important;
        border-color: transparent !important;
    }
    .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover .rzi,
    .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover .rz-button-text {
        color: #ffffff !important;
    }
}

/* ─── Consistent icon-only button size: 32×32 ─────────────────────────── */
/* Radzen Small icon-only buttons */
.rz-button-sm.rz-button-icon-only {
    width:  32px !important;
    height: 32px !important;
    padding: 0   !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.rz-button-sm.rz-button-icon-only .rzi {
    font-size: 18px !important;
}
/* Radzen ExtraSmall icon-only buttons (in-card inline actions) */
.rz-button-xs.rz-button-icon-only {
    width:  24px !important;
    height: 24px !important;
    padding: 0   !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.rz-button-xs.rz-button-icon-only .rzi {
    font-size: 14px !important;
}

/* ─── sol-icon-btn: custom non-Radzen buttons (Solutions + Settings) ─── */
.sol-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
    height: 32px;
    background: #f1f5f9;
    color: #1e3a5f;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.sol-icon-btn .material-icons { color: #1e3a5f; transition: color .15s; font-size: 18px; }
.sol-icon-btn:hover:not([disabled]) {
    background: #1e3a5f;
    color: #ffffff;
    border-color: #1e3a5f;
}
.sol-icon-btn:hover:not([disabled]) .material-icons { color: #ffffff; }
.sol-icon-btn[disabled] { opacity: .45; cursor: not-allowed; }

.sol-icon-btn--sm { padding: 2px 5px; font-size: .75rem; }
.sol-icon-btn--sm .material-icons { font-size: 14px; }

/* Ghost variant: icon-only, no border/background — for inline row buttons */
.sol-icon-btn--ghost {
    background: none;
    border: none;
    height: auto;
    padding: 2px 4px;
    color: #64748b;
}
.sol-icon-btn--ghost .material-icons { color: #64748b; }
.sol-icon-btn--ghost:hover:not([disabled]) {
    background: none;
    border: none;
    color: #1e3a5f;
}
.sol-icon-btn--ghost:hover:not([disabled]) .material-icons { color: #1e3a5f; }
.sol-icon-btn--ghost.sol-icon-btn--danger { background: none; border: none; }
.sol-icon-btn--ghost.sol-icon-btn--danger .material-icons { color: #be123c; }
.sol-icon-btn--ghost.sol-icon-btn--danger:hover:not([disabled]) { background: none; border: none; }
.sol-icon-btn--ghost.sol-icon-btn--danger:hover:not([disabled]) .material-icons { color: #9f1239; }

.sol-icon-btn--danger {
    background: #fee2e2;
    color: #be123c;
    border-color: #fecdd3;
}
.sol-icon-btn--danger .material-icons { color: #be123c; }
.sol-icon-btn--danger:hover:not([disabled]) {
    background: #be123c;
    color: #ffffff;
    border-color: #be123c;
}
.sol-icon-btn--danger:hover:not([disabled]) .material-icons { color: #ffffff; }

/* ─── Import-label buttons (file picker styled as button) ─────────────── */
.import-label-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    transition: background .15s, border-color .15s;
}
.import-label-btn .material-icons { font-size: 18px; color: #1e3a5f; }
.import-label-btn:hover { background: #1e3a5f; border-color: #1e3a5f; }
.import-label-btn:hover .material-icons { color: #ffffff; }

/* Final dark-mode contrast pass: loaded after component/control defaults. */
html.app-dark-root,
body.app-dark-body,
.app-shell.app-dark {
    --app-dark-page: #0f172a;
    --app-dark-surface: #111827;
    --app-dark-surface-2: #172033;
    --app-dark-surface-3: #1e293b;
    --app-dark-border: #334155;
    --app-dark-border-strong: #475569;
    --app-dark-text: #e5e7eb;
    --app-dark-title: #f8fafc;
    --app-dark-muted: #cbd5e1;
    --app-dark-primary: #93c5fd;
    --app-dark-primary-strong: #60a5fa;
}

body.app-dark-body .rz-popup,
body.app-dark-body .rz-dropdown-panel,
body.app-dark-body .rz-multiselect-panel,
body.app-dark-body .rz-listbox,
body.app-dark-body .rz-calendar,
body.app-dark-body .rz-datepicker,
body.app-dark-body .rz-dialog,
body.app-dark-body .rz-dialog-wrapper,
body.app-dark-body .rz-overlaypanel,
body.app-dark-body .rz-menu,
body.app-dark-body .rz-context-menu,
.app-shell.app-dark .rz-card,
.app-shell.app-dark .rz-panel,
.app-shell.app-dark .rz-fieldset,
.app-shell.app-dark .rz-tabview-panels,
.app-shell.app-dark .rz-accordion-content {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

body.app-dark-body .rz-dialog-titlebar,
body.app-dark-body .rz-dialog-content,
body.app-dark-body .rz-dialog .rz-dialog-content {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

body.app-dark-body .rz-dialog-titlebar {
    background: var(--app-dark-surface-2) !important;
}

body.app-dark-body .rz-dialog-title,
body.app-dark-body .rz-dialog h1,
body.app-dark-body .rz-dialog h2,
body.app-dark-body .rz-dialog h3,
body.app-dark-body .rz-dialog h4,
body.app-dark-body .rz-dialog h5,
body.app-dark-body .rz-dialog h6,
body.app-dark-body .rz-dialog label,
body.app-dark-body .rz-dialog .dlg-label {
    color: var(--app-dark-title) !important;
}

body.app-dark-body .rz-dialog .dlg-hint,
body.app-dark-body .rz-dialog .rz-placeholder,
body.app-dark-body .rz-dialog .rz-dropdown-label,
body.app-dark-body .rz-dialog .rz-multiselect-label {
    color: var(--app-dark-muted) !important;
    opacity: 1 !important;
}

body.app-dark-body .rz-dialog .dlg-required {
    color: #fca5a5 !important;
}

body.app-dark-body .rz-dialog input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.app-dark-body .rz-dialog select,
body.app-dark-body .rz-dialog textarea,
body.app-dark-body .rz-dialog .rz-textbox,
body.app-dark-body .rz-dialog .rz-inputtext,
body.app-dark-body .rz-dialog .rz-textarea,
body.app-dark-body .rz-dialog .rz-dropdown,
body.app-dark-body .rz-dialog .rz-multiselect,
body.app-dark-body .rz-dialog .rz-spinner,
body.app-dark-body .rz-dialog .rz-numeric,
body.app-dark-body .rz-dialog .rz-autocomplete,
body.app-dark-body .rz-dialog .rz-datepicker,
body.app-dark-body .rz-dialog .rz-colorpicker,
body.app-dark-body .rz-dialog .rz-html-editor,
body.app-dark-body .rz-dialog .rz-html-editor-content,
body.app-dark-body .rz-dialog .rz-html-editor-toolbar {
    background: var(--app-dark-page) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
    box-shadow: none !important;
}

body.app-dark-body .rz-dialog .rz-state-focused,
body.app-dark-body .rz-dialog input:focus,
body.app-dark-body .rz-dialog textarea:focus,
body.app-dark-body .rz-dialog select:focus,
body.app-dark-body .rz-dialog .rz-dropdown:focus-within,
body.app-dark-body .rz-dialog .rz-multiselect:focus-within {
    border-color: var(--app-dark-primary-strong) !important;
    box-shadow: 0 0 0 2px rgba(96,165,250,.25) !important;
}

body.app-dark-body .rz-dialog .rz-dialog-titlebar-icon,
body.app-dark-body .rz-dialog .rz-dialog-titlebar-close {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
}

body.app-dark-body .rz-dialog .rz-dialog-titlebar-icon:hover,
body.app-dark-body .rz-dialog .rz-dialog-titlebar-close:hover {
    background: var(--app-dark-primary-strong) !important;
    color: #ffffff !important;
}

body.app-dark-body .rz-dropdown-item,
body.app-dark-body .rz-multiselect-item,
body.app-dark-body .rz-listbox-item,
body.app-dark-body .rz-menuitem,
body.app-dark-body .rz-context-menu-item,
body.app-dark-body .rz-calendar-cell,
.app-shell.app-dark .rz-label,
.app-shell.app-dark .rz-form-field-label,
.app-shell.app-dark .rz-fieldset-legend,
.app-shell.app-dark .rz-tabview-title,
.app-shell.app-dark .rz-accordion-header {
    color: var(--app-dark-text) !important;
}

body.app-dark-body .rz-dropdown-item:hover,
body.app-dark-body .rz-multiselect-item:hover,
body.app-dark-body .rz-listbox-item:hover,
body.app-dark-body .rz-menuitem:hover,
body.app-dark-body .rz-context-menu-item:hover,
body.app-dark-body .rz-calendar-cell:hover,
body.app-dark-body .rz-state-hover,
body.app-dark-body .rz-state-highlight,
.app-shell.app-dark .rz-tabview-selected,
.app-shell.app-dark .rz-accordion-header:hover {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
}

.app-shell.app-dark input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.app-shell.app-dark select,
.app-shell.app-dark textarea,
.app-shell.app-dark .rz-textbox,
.app-shell.app-dark .rz-inputtext,
.app-shell.app-dark .rz-textarea,
.app-shell.app-dark .rz-dropdown,
.app-shell.app-dark .rz-multiselect,
.app-shell.app-dark .rz-spinner,
.app-shell.app-dark .rz-numeric,
.app-shell.app-dark .rz-autocomplete,
.app-shell.app-dark .rz-datepicker,
.app-shell.app-dark .rz-colorpicker,
.app-shell.app-dark .rz-html-editor {
    background: var(--app-dark-page) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
    box-shadow: none !important;
}

.app-shell.app-dark .rz-html-editor-toolbar,
.app-shell.app-dark .rz-html-editor-content,
.app-shell.app-dark .detail-drawer .rz-html-editor-toolbar,
.app-shell.app-dark .detail-drawer .rz-html-editor-content,
.app-shell.app-dark .side-drawer .rz-html-editor-toolbar,
.app-shell.app-dark .side-drawer .rz-html-editor-content,
.app-shell.app-dark .idea-so-panel .rz-html-editor-toolbar,
.app-shell.app-dark .idea-so-panel .rz-html-editor-content,
body.app-dark-body .rz-dialog .rz-html-editor-toolbar,
body.app-dark-body .rz-dialog .rz-html-editor-content {
    background: var(--app-dark-page) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .rz-html-editor-content *,
.app-shell.app-dark .detail-drawer .rz-html-editor-content *,
.app-shell.app-dark .side-drawer .rz-html-editor-content *,
.app-shell.app-dark .idea-so-panel .rz-html-editor-content *,
body.app-dark-body .rz-dialog .rz-html-editor-content * {
    background-color: transparent !important;
    color: inherit !important;
}

.app-shell.app-dark input::placeholder,
.app-shell.app-dark textarea::placeholder,
.app-shell.app-dark .rz-placeholder,
.app-shell.app-dark .rz-dropdown-label,
.app-shell.app-dark .rz-multiselect-label,
body.app-dark-body .rz-dropdown-label,
body.app-dark-body .rz-multiselect-label {
    color: var(--app-dark-muted) !important;
    opacity: 1 !important;
}

.app-shell.app-dark input:focus,
.app-shell.app-dark select:focus,
.app-shell.app-dark textarea:focus,
.app-shell.app-dark .rz-state-focused,
.app-shell.app-dark .rz-dropdown:focus-within,
.app-shell.app-dark .rz-multiselect:focus-within {
    border-color: var(--app-dark-primary-strong) !important;
    box-shadow: 0 0 0 2px rgba(96,165,250,.25) !important;
}

.app-shell.app-dark .rz-chkbox-box,
.app-shell.app-dark .rz-radiobutton-box,
body.app-dark-body .rz-chkbox-box,
body.app-dark-body .rz-radiobutton-box {
    background: var(--app-dark-page) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .rz-button,
.app-shell.app-dark .sol-icon-btn,
.app-shell.app-dark .import-label-btn,
.app-shell.app-dark button:not(.appbar-nav-link):not(.appbar-project-chip):not(.appbar-user-chip):not(.appbar-menu-button):not(.appbar-designer-status) {
    background-color: var(--app-dark-surface-3) !important;
    background-image: none !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
    box-shadow: none !important;
}
.app-shell.app-dark .rz-button .rzi,
.app-shell.app-dark .rz-button .rz-button-text,
.app-shell.app-dark .sol-icon-btn .material-icons,
.app-shell.app-dark .import-label-btn .material-icons,
.app-shell.app-dark button:not(.appbar-nav-link):not(.appbar-project-chip):not(.appbar-user-chip):not(.appbar-menu-button):not(.appbar-designer-status) .material-icons {
    color: var(--app-dark-text) !important;
}
.app-shell.app-dark .rz-button:not(.rz-state-disabled):not(:active):hover,
.app-shell.app-dark .sol-icon-btn:hover:not([disabled]),
.app-shell.app-dark .import-label-btn:hover,
.app-shell.app-dark button:not(.appbar-nav-link):not(.appbar-project-chip):not(.appbar-user-chip):not(.appbar-menu-button):not(.appbar-designer-status):not([disabled]):hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: var(--app-dark-primary-strong) !important;
}
.app-shell.app-dark .rz-button:not(.rz-state-disabled):not(:active):hover .rzi,
.app-shell.app-dark .rz-button:not(.rz-state-disabled):not(:active):hover .rz-button-text,
.app-shell.app-dark .sol-icon-btn:hover:not([disabled]) .material-icons,
.app-shell.app-dark .import-label-btn:hover .material-icons,
.app-shell.app-dark button:not(.appbar-nav-link):not(.appbar-project-chip):not(.appbar-user-chip):not(.appbar-menu-button):not(.appbar-designer-status):not([disabled]):hover .material-icons {
    color: #ffffff !important;
}
.app-shell.app-dark .rz-button.rz-danger,
.app-shell.app-dark .rz-button.rz-error,
.app-shell.app-dark .sol-icon-btn--danger,
.app-shell.app-dark .idea-action-btn--danger,
.app-shell.app-dark .idea-popup-item--danger,
.app-shell.app-dark .idea-popup-item--delete {
    background: #7f1d1d !important;
    color: #fee2e2 !important;
    border-color: #dc2626 !important;
}
.app-shell.app-dark .rz-button.rz-danger .rzi,
.app-shell.app-dark .rz-button.rz-danger .rz-button-text,
.app-shell.app-dark .rz-button.rz-error .rzi,
.app-shell.app-dark .rz-button.rz-error .rz-button-text,
.app-shell.app-dark .sol-icon-btn--danger .material-icons {
    color: #fee2e2 !important;
}

.app-shell.app-dark [style*="background:#fff"],
.app-shell.app-dark [style*="background: #fff"],
.app-shell.app-dark [style*="background:#ffffff"],
.app-shell.app-dark [style*="background: #ffffff"],
.app-shell.app-dark [style*="background:white"],
.app-shell.app-dark [style*="background: white"],
.app-shell.app-dark [style*="background:#f8fafc"],
.app-shell.app-dark [style*="background: #f8fafc"],
.app-shell.app-dark [style*="background:#f9fafb"],
.app-shell.app-dark [style*="background: #f9fafb"],
.app-shell.app-dark [style*="background:#f3f4f6"],
.app-shell.app-dark [style*="background: #f3f4f6"],
.app-shell.app-dark [style*="background:#f1f5f9"],
.app-shell.app-dark [style*="background: #f1f5f9"],
.app-shell.app-dark [style*="background:#f5f5f5"],
.app-shell.app-dark [style*="background: #f5f5f5"],
.app-shell.app-dark [style*="background:#fafafa"],
.app-shell.app-dark [style*="background: #fafafa"],
.app-shell.app-dark [style*="background:#f0f5ff"],
.app-shell.app-dark [style*="background: #f0f5ff"],
.app-shell.app-dark [style*="background:#f5f3ff"],
.app-shell.app-dark [style*="background: #f5f3ff"] {
    background: var(--app-dark-surface) !important;
}
.app-shell.app-dark [style*="background:#eff6ff"],
.app-shell.app-dark [style*="background: #eff6ff"],
.app-shell.app-dark [style*="background:#eef2ff"],
.app-shell.app-dark [style*="background: #eef2ff"],
.app-shell.app-dark [style*="background:#e0f2fe"],
.app-shell.app-dark [style*="background: #e0f2fe"],
.app-shell.app-dark [style*="background:#dbeafe"],
.app-shell.app-dark [style*="background: #dbeafe"] {
    background: #0c4a6e !important;
    color: #e0f2fe !important;
}
.app-shell.app-dark [style*="background:#fff1f2"],
.app-shell.app-dark [style*="background: #fff1f2"],
.app-shell.app-dark [style*="background:#fef2f2"],
.app-shell.app-dark [style*="background: #fef2f2"],
.app-shell.app-dark [style*="background:#fee2e2"],
.app-shell.app-dark [style*="background: #fee2e2"] {
    background: #7f1d1d !important;
    color: #fee2e2 !important;
}
.app-shell.app-dark [style*="background:#fef3c7"],
.app-shell.app-dark [style*="background: #fef3c7"],
.app-shell.app-dark [style*="background:#fef9c3"],
.app-shell.app-dark [style*="background: #fef9c3"] {
    background: #713f12 !important;
    color: #fef3c7 !important;
}
.app-shell.app-dark [style*="color:#111827"],
.app-shell.app-dark [style*="color: #111827"],
.app-shell.app-dark [style*="color:#172b4d"],
.app-shell.app-dark [style*="color: #172b4d"],
.app-shell.app-dark [style*="color:#1e293b"],
.app-shell.app-dark [style*="color: #1e293b"],
.app-shell.app-dark [style*="color:#334155"],
.app-shell.app-dark [style*="color: #334155"],
.app-shell.app-dark [style*="color:#374151"],
.app-shell.app-dark [style*="color: #374151"],
.app-shell.app-dark [style*="color:#44546f"],
.app-shell.app-dark [style*="color: #44546f"],
.app-shell.app-dark [style*="color:#475569"],
.app-shell.app-dark [style*="color: #475569"] {
    color: var(--app-dark-text) !important;
}
.app-shell.app-dark [style*="color:#626f86"],
.app-shell.app-dark [style*="color: #626f86"],
.app-shell.app-dark [style*="color:#64748b"],
.app-shell.app-dark [style*="color: #64748b"],
.app-shell.app-dark [style*="color:#6b7280"],
.app-shell.app-dark [style*="color: #6b7280"],
.app-shell.app-dark [style*="color:#94a3b8"],
.app-shell.app-dark [style*="color: #94a3b8"],
.app-shell.app-dark [style*="color:#9ca3af"],
.app-shell.app-dark [style*="color: #9ca3af"],
.app-shell.app-dark [style*="color:#adb5bd"],
.app-shell.app-dark [style*="color: #adb5bd"] {
    color: var(--app-dark-muted) !important;
}
.app-shell.app-dark [style*="color:#1e3a5f"],
.app-shell.app-dark [style*="color: #1e3a5f"],
.app-shell.app-dark [style*="color:#2563a8"],
.app-shell.app-dark [style*="color: #2563a8"] {
    color: var(--app-dark-primary) !important;
}
.app-shell.app-dark [style*="#e2e8f0"],
.app-shell.app-dark [style*="#e5e7eb"],
.app-shell.app-dark [style*="#d1d5db"],
.app-shell.app-dark [style*="#cbd5e1"],
.app-shell.app-dark [style*="#f1f5f9"] {
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .chat-avatar--bot,
.app-shell.app-dark .chat-bubble--assistant,
.app-shell.app-dark .quick-cmd:hover,
.app-shell.app-dark .wi-card,
.app-shell.app-dark .wi-edit-form,
.app-shell.app-dark .desc-image-thumb,
.app-shell.app-dark .attachment-row,
.app-shell.app-dark .settings-body-layout,
.app-shell.app-dark .settings-content,
.app-shell.app-dark .settings-dialog,
.app-shell.app-dark .sprint-section,
.app-shell.app-dark .sprint-card,
.app-shell.app-dark .backlog-group,
.app-shell.app-dark .backlog-row,
.app-shell.app-dark .jira-card,
.app-shell.app-dark .jira-col-header,
.app-shell.app-dark .intake-card,
.app-shell.app-dark .intake-section,
.app-shell.app-dark .vel-fte-card,
.app-shell.app-dark .sol-card,
.app-shell.app-dark .sol-linked-idea,
.app-shell.app-dark .sol-idea-card,
.app-shell.app-dark .search-detail-modal,
.app-shell.app-dark .modal-panel,
.app-shell.app-dark .detail-drawer,
.app-shell.app-dark .idea-so-panel,
.app-shell.app-dark .ideate-bulk-popup {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .settings-leftnav,
.app-shell.app-dark .settings-dialog-header,
.app-shell.app-dark .settings-dialog-footer,
.app-shell.app-dark .sprint-header,
.app-shell.app-dark .sprint-lane-header,
.app-shell.app-dark .backlog-group-header,
.app-shell.app-dark .backlog-col-headers,
.app-shell.app-dark .jira-col,
.app-shell.app-dark .sol-panel-header,
.app-shell.app-dark .sol-card-header,
.app-shell.app-dark .sol-idea-desc,
.app-shell.app-dark .sol-ideas-area,
.app-shell.app-dark .sol-decisions,
.app-shell.app-dark .vel-cap-header,
.app-shell.app-dark .sb-sprint-header,
.app-shell.app-dark .sb-sprint-progress,
.app-shell.app-dark .sb-sprint-stats,
.app-shell.app-dark .sb-iter-summary,
.app-shell.app-dark .sb-prio-group-header,
.app-shell.app-dark .sb-card-details,
.app-shell.app-dark .appbar-search-dropdown,
.app-shell.app-dark .appbar-search-group-header {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .chat-bubble--error,
.app-shell.app-dark .voice-indicator,
.app-shell.app-dark .app-alert--error {
    background: #7f1d1d !important;
    color: #fee2e2 !important;
    border-color: #dc2626 !important;
}

.app-shell.app-dark .jira-card-title,
.app-shell.app-dark .jira-col-title,
.app-shell.app-dark .sprint-name,
.app-shell.app-dark .sprint-card-title,
.app-shell.app-dark .backlog-item-title,
.app-shell.app-dark .backlog-group-label,
.app-shell.app-dark .dash-recent-title,
.app-shell.app-dark .settings-label,
.app-shell.app-dark .vel-section-label strong,
.app-shell.app-dark .vel-fte-num,
.app-shell.app-dark .vel-cap-header,
.app-shell.app-dark .sol-panel-header,
.app-shell.app-dark .attachment-name,
.app-shell.app-dark .work-item-description,
.app-shell.app-dark .desc-readonly {
    color: var(--app-dark-title) !important;
}

.app-shell.app-dark .jira-card-desc,
.app-shell.app-dark .jira-card-id,
.app-shell.app-dark .jira-col-count,
.app-shell.app-dark .jira-col-empty,
.app-shell.app-dark .sprint-full-path,
.app-shell.app-dark .sprint-card-id,
.app-shell.app-dark .sprint-lane-empty,
.app-shell.app-dark .backlog-col-headers,
.app-shell.app-dark .backlog-item-id,
.app-shell.app-dark .backlog-empty,
.app-shell.app-dark .backlog-no-sp,
.app-shell.app-dark .dash-recent-id,
.app-shell.app-dark .dash-recent-date,
.app-shell.app-dark .settings-desc,
.app-shell.app-dark .settings-section-title,
.app-shell.app-dark .settings-hint,
.app-shell.app-dark .settings-empty,
.app-shell.app-dark .intake-label,
.app-shell.app-dark .vel-subtitle,
.app-shell.app-dark .vel-empty,
.app-shell.app-dark .vel-muted,
.app-shell.app-dark .vel-donut-stats,
.app-shell.app-dark .vel-fte-label,
.app-shell.app-dark .vel-fte-sub,
.app-shell.app-dark .sol-empty,
.app-shell.app-dark .sol-drop-hint,
.app-shell.app-dark .attachment-size,
.app-shell.app-dark .desc-dropzone-hint,
.app-shell.app-dark .appbar-search-sublabel {
    color: var(--app-dark-muted) !important;
}

.app-shell.app-dark .jira-card:hover,
.app-shell.app-dark .sprint-card:hover,
.app-shell.app-dark .backlog-row:hover,
.app-shell.app-dark .dash-recent-row:hover,
.app-shell.app-dark .settings-list-row:hover,
.app-shell.app-dark .sol-idea-card:hover,
.app-shell.app-dark .sol-idea-card--selected,
.app-shell.app-dark .sol-card--dragover,
.app-shell.app-dark .vel-table tr:hover td,
.app-shell.app-dark .vel-th--on,
.app-shell.app-dark .vel-td--on,
.app-shell.app-dark .idea-card--selected,
.app-shell.app-dark .backlog-row--selected,
.app-shell.app-dark .backlog-row--drop-above,
.app-shell.app-dark .backlog-row--drop-below,
.app-shell.app-dark .backlog-empty--droptarget,
.app-shell.app-dark .jira-col--over {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
    border-color: var(--app-dark-primary-strong) !important;
}

.app-shell.app-dark .vel-pill,
.app-shell.app-dark .sol-filter-pill,
.app-shell.app-dark .sol-cat-pill,
.app-shell.app-dark .settings-leftnav-item,
.app-shell.app-dark .img-tool-btn,
.app-shell.app-dark .desc-img-badge,
.app-shell.app-dark .jira-avatar--empty,
.app-shell.app-dark .sb-pill,
.app-shell.app-dark .bl-pill {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-muted) !important;
    border-color: var(--app-dark-border-strong) !important;
}
.app-shell.app-dark .vel-pill:hover,
.app-shell.app-dark .sol-filter-pill:hover,
.app-shell.app-dark .sol-cat-pill:hover,
.app-shell.app-dark .settings-leftnav-item:hover,
.app-shell.app-dark .img-tool-btn:hover,
.app-shell.app-dark .sb-pill:hover,
.app-shell.app-dark .bl-pill:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: var(--app-dark-primary-strong) !important;
}
.app-shell.app-dark .vel-pill--active,
.app-shell.app-dark .sol-filter-pill--active,
.app-shell.app-dark .sol-cat-pill--active,
.app-shell.app-dark .settings-leftnav-item--active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: var(--app-dark-primary-strong) !important;
}

.app-shell.app-dark .vel-table th,
.app-shell.app-dark .vel-table td,
.app-shell.app-dark .sprint-lane,
.app-shell.app-dark .backlog-row,
.app-shell.app-dark .dash-recent-row,
.app-shell.app-dark .sol-decision-row,
.app-shell.app-dark .idea-desc-panel,
.app-shell.app-dark .idea-popup-divider,
.app-shell.app-dark .ctx-divider {
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .mapping-badge--aiforge,
.app-shell.app-dark .board-tag,
.app-shell.app-dark .jira-tag,
.app-shell.app-dark .sol-chip--cat,
.app-shell.app-dark .appbar-user-role-badge--superuser {
    background: #3b0764 !important;
    color: #e9d5ff !important;
}
.app-shell.app-dark .jira-story-pts,
.app-shell.app-dark .sprint-item-badge,
.app-shell.app-dark .backlog-summary-chip--total,
.app-shell.app-dark .settings-badge,
.app-shell.app-dark .settings-badge--builtin,
.app-shell.app-dark .vel-badge--grey,
.app-shell.app-dark .sb-stat-chip--date,
.app-shell.app-dark .sb-prio-chip--none,
.app-shell.app-dark .sol-count,
.app-shell.app-dark .appbar-user-role-badge--reader {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-muted) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .settings-badge[style*="background:#fce7f3"],
.app-shell.app-dark .settings-badge[style*="background: #fce7f3"] {
    background: #831843 !important;
    color: #fbcfe8 !important;
}

.app-shell.app-dark .settings-badge[style*="background:#dbeafe"],
.app-shell.app-dark .settings-badge[style*="background: #dbeafe"] {
    background: #1e3a8a !important;
    color: #dbeafe !important;
}

.app-shell.app-dark .settings-badge[style*="background:#dcfce7"],
.app-shell.app-dark .settings-badge[style*="background: #dcfce7"] {
    background: #14532d !important;
    color: #bbf7d0 !important;
}

.app-shell.app-dark .settings-badge[style*="background:#fef3c7"],
.app-shell.app-dark .settings-badge[style*="background: #fef3c7"] {
    background: #713f12 !important;
    color: #fde68a !important;
}
.app-shell.app-dark .vel-badge--green,
.app-shell.app-dark .sprint-sp-badge,
.app-shell.app-dark .chip--green,
.app-shell.app-dark .sb-stat-chip--done,
.app-shell.app-dark .sb-stat-chip--capacity,
.app-shell.app-dark .sb-prio-chip--4 {
    background: #14532d !important;
    color: #bbf7d0 !important;
}
.app-shell.app-dark .vel-badge--blue,
.app-shell.app-dark .backlog-sprint,
.app-shell.app-dark .chip--secondary,
.app-shell.app-dark .sb-stat-chip--total,
.app-shell.app-dark .sb-est-chip,
.app-shell.app-dark .appbar-user-role-badge--contributor {
    background: #1e3a8a !important;
    color: #bfdbfe !important;
}
.app-shell.app-dark .vel-badge--red,
.app-shell.app-dark .backlog-summary-chip--critical,
.app-shell.app-dark .sb-prio-chip--1 {
    background: #7f1d1d !important;
    color: #fecaca !important;
}
.app-shell.app-dark .backlog-summary-chip--high,
.app-shell.app-dark .backlog-summary-chip--unscheduled,
.app-shell.app-dark .sb-stat-chip--pending,
.app-shell.app-dark .sb-prio-chip--2,
.app-shell.app-dark .sb-prio-chip--3,
.app-shell.app-dark .attachment-pending-badge,
.app-shell.app-dark .appbar-user-role-badge--admin {
    background: #713f12 !important;
    color: #fef3c7 !important;
}

.app-shell.app-dark .desc-dropzone-hint {
    background: rgba(15,23,42,.82) !important;
}
.app-shell.app-dark .desc-readonly::after {
    background: linear-gradient(transparent, var(--app-dark-surface)) !important;
}
.app-shell.app-dark .rz-grid-table th,
.app-shell.app-dark .rz-datatable-thead th,
.app-shell.app-dark .rz-grid-table td,
.app-shell.app-dark .rz-datatable-data td,
.app-shell.app-dark .rz-paginator,
.app-shell.app-dark .rz-column-title {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .app-appbar .rz-button,
.app-shell.app-dark .app-appbar button.rz-button {
    background-color: transparent !important;
    color: rgba(255,255,255,.88) !important;
    border-color: transparent !important;
}
.app-shell.app-dark .app-appbar .rz-button .rzi,
.app-shell.app-dark .app-appbar .rz-button .rz-button-text,
.app-shell.app-dark .app-appbar button.rz-button .rzi,
.app-shell.app-dark .app-appbar button.rz-button .rz-button-text {
    color: rgba(255,255,255,.88) !important;
}
.app-shell.app-dark .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover,
.app-shell.app-dark .app-appbar button.rz-button:not(.rz-state-disabled):not(:active):hover {
    background-color: rgba(255,255,255,.15) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}
.app-shell.app-dark .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover .rzi,
.app-shell.app-dark .app-appbar .rz-button:not(.rz-state-disabled):not(:active):hover .rz-button-text,
.app-shell.app-dark .app-appbar button.rz-button:not(.rz-state-disabled):not(:active):hover .rzi,
.app-shell.app-dark .app-appbar button.rz-button:not(.rz-state-disabled):not(:active):hover .rz-button-text {
    color: #ffffff !important;
}

.app-shell.app-dark .appbar-project-avatar,
.app-shell.app-dark .appbar-project-item-avatar {
    background: #0f766e !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18) !important;
}

/* Dynamic board/form contrast cleanup for inline badges, Gantt rows, and grids. */
.app-shell.app-dark [style*="background:#f0f9ff"],
.app-shell.app-dark [style*="background: #f0f9ff"],
.app-shell.app-dark [style*="background:#f0fdf4"],
.app-shell.app-dark [style*="background: #f0fdf4"],
.app-shell.app-dark [style*="background:#fefce8"],
.app-shell.app-dark [style*="background: #fefce8"],
.app-shell.app-dark [style*="background:#dcfce7"],
.app-shell.app-dark [style*="background: #dcfce7"],
.app-shell.app-dark [style*="background:#d1fae5"],
.app-shell.app-dark [style*="background: #d1fae5"],
.app-shell.app-dark [style*="background:#ede9fe"],
.app-shell.app-dark [style*="background: #ede9fe"],
.app-shell.app-dark [style*="background:#e0e7ff"],
.app-shell.app-dark [style*="background: #e0e7ff"],
.app-shell.app-dark [style*="background:#bae6fd"],
.app-shell.app-dark [style*="background: #bae6fd"],
.app-shell.app-dark [style*="background:#e2e8f0"],
.app-shell.app-dark [style*="background: #e2e8f0"],
.app-shell.app-dark [style*="background: rgb(248, 250, 252)"],
.app-shell.app-dark [style*="background: rgb(255, 255, 255)"],
.app-shell.app-dark [style*="background:rgb(248, 250, 252)"],
.app-shell.app-dark [style*="background:rgb(255, 255, 255)"] {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark [style*="color:#4c1d95"],
.app-shell.app-dark [style*="color: #4c1d95"],
.app-shell.app-dark [style*="color:#5b21b6"],
.app-shell.app-dark [style*="color: #5b21b6"],
.app-shell.app-dark [style*="color:#7c3aed"],
.app-shell.app-dark [style*="color: #7c3aed"],
.app-shell.app-dark [style*="color:#8b5cf6"],
.app-shell.app-dark [style*="color: #8b5cf6"],
.app-shell.app-dark [style*="color:#4f46e5"],
.app-shell.app-dark [style*="color: #4f46e5"],
.app-shell.app-dark [style*="color:#6366f1"],
.app-shell.app-dark [style*="color: #6366f1"],
.app-shell.app-dark [style*="color:#1d4ed8"],
.app-shell.app-dark [style*="color: #1d4ed8"],
.app-shell.app-dark [style*="color:#2563eb"],
.app-shell.app-dark [style*="color: #2563eb"],
.app-shell.app-dark [style*="color:#0369a1"],
.app-shell.app-dark [style*="color: #0369a1"],
.app-shell.app-dark [style*="color:#16a34a"],
.app-shell.app-dark [style*="color: #16a34a"],
.app-shell.app-dark [style*="color:#10b981"],
.app-shell.app-dark [style*="color: #10b981"],
.app-shell.app-dark [style*="color:#ef4444"],
.app-shell.app-dark [style*="color: #ef4444"] {
    color: var(--app-dark-primary) !important;
}

.app-shell.app-dark .wi-type-icon,
.app-shell.app-dark .wi-type-icon .rz-icon,
.app-shell.app-dark .wi-type-icon .rzi,
.app-shell.app-dark .backlog-type-chip,
.app-shell.app-dark .backlog-state-badge,
.app-shell.app-dark .sb-state-badge,
.app-shell.app-dark .dash-recent-badge,
.app-shell.app-dark .jira-prio-dot,
.app-shell.app-dark .backlog-group-count,
.app-shell.app-dark .sprint-lane-count,
.app-shell.app-dark .jira-col-count,
.app-shell.app-dark .intake-status-badge {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .rz-grid,
.app-shell.app-dark .rz-data-grid,
.app-shell.app-dark .rz-grid-table,
.app-shell.app-dark .rz-grid-table tbody,
.app-shell.app-dark .rz-grid-table tr,
.app-shell.app-dark .rz-grid-table td,
.app-shell.app-dark .rz-grid-table .rz-cell-data,
.app-shell.app-dark .rz-grid-table .rz-text-truncate,
.app-shell.app-dark .rz-datatable,
.app-shell.app-dark .rz-datatable-data,
.app-shell.app-dark .rz-datatable-data tr,
.app-shell.app-dark .rz-datatable-data td,
.app-shell.app-dark .rz-datatable-data .rz-cell-data,
.app-shell.app-dark .rz-datatable-data .rz-text-truncate {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .rz-grid-table tr:hover td,
.app-shell.app-dark .rz-datatable-data tr:hover td,
.app-shell.app-dark .rz-selectable tbody tr:hover td {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
}

.app-shell.app-dark .settings-list-row,
.app-shell.app-dark .settings-list-row *,
.app-shell.app-dark .roadmap-gantt,
.app-shell.app-dark .roadmap-gantt *,
.app-shell.app-dark .rm-gantt,
.app-shell.app-dark .rm-gantt *,
.app-shell.app-dark [style*="position: absolute"][style*="width:"][style*="height:"],
.app-shell.app-dark [style*="display: flex"][style*="flex-shrink: 0"][style*="height: 56px"] {
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .settings-list-row,
.app-shell.app-dark [style*="flex-direction:column"][style*="align-items:stretch"],
.app-shell.app-dark [style*="width:6px"][style*="cursor:col-resize"],
.app-shell.app-dark [style*="width: 6px"][style*="cursor: col-resize"],
.app-shell.app-dark [style*="position: absolute"][style*="background: rgb(248, 250, 252)"],
.app-shell.app-dark [style*="position: absolute"][style*="background: rgb(255, 255, 255)"] {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark [style*="background:#ef4444"],
.app-shell.app-dark [style*="background: #ef4444"],
.app-shell.app-dark [style*="background: rgb(239, 68, 68)"],
.app-shell.app-dark [style*="background:#dc2626"],
.app-shell.app-dark [style*="background: #dc2626"],
.app-shell.app-dark [style*="background: rgb(220, 38, 38)"] {
    background: #991b1b !important;
    color: #fee2e2 !important;
}

.app-shell.app-dark [style*="background:#fdf4ff"],
.app-shell.app-dark [style*="background: #fdf4ff"],
.app-shell.app-dark [style*="background: rgb(253, 244, 255)"],
.app-shell.app-dark .jira-children-badge {
    background: #3b0764 !important;
    color: #f5d0fe !important;
    border-color: #7e22ce !important;
}

.app-shell.app-dark [style*="color:#a16207"],
.app-shell.app-dark [style*="color: #a16207"],
.app-shell.app-dark [style*="color: rgb(161, 98, 7)"] {
    color: #fde68a !important;
}

.app-shell.app-dark [style*="background:rgba(255,255,255,.85)"],
.app-shell.app-dark [style*="background: rgba(255,255,255,.85)"],
.app-shell.app-dark [style*="background: rgba(255, 255, 255, 0.85)"],
.app-shell.app-dark [style*="background:rgba(255, 255, 255, 0.85)"] {
    background: #1e3a8a !important;
    color: #dbeafe !important;
    border-color: #60a5fa !important;
}

.app-shell.app-dark .select-project-card,
.app-shell.app-dark .select-project-card--active,
.app-shell.app-dark .select-project-card:hover {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.28) !important;
}

.app-shell.app-dark .select-project-card--active,
.app-shell.app-dark .select-project-card:hover {
    border-color: var(--app-dark-primary-strong) !important;
}

.app-shell.app-dark .select-project-card [style*="width:44px"][style*="height:44px"],
.app-shell.app-dark .select-project-card [style*="width: 44px"][style*="height: 44px"] {
    background: #0f766e !important;
}

.app-shell.app-dark .select-project-card .material-icons,
.app-shell.app-dark .select-project-card [style*="color:white"],
.app-shell.app-dark .select-project-card [style*="color: white"] {
    color: #ffffff !important;
}

.app-shell.app-dark .rz-pager,
.app-shell.app-dark .rz-paginator,
.app-shell.app-dark .rz-grid-pager {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .rz-pager .rz-pager-item,
.app-shell.app-dark .rz-pager .rz-pager-link,
.app-shell.app-dark .rz-pager a,
.app-shell.app-dark .rz-pager button,
.app-shell.app-dark .rz-paginator .rz-paginator-page,
.app-shell.app-dark .rz-paginator .rz-paginator-element {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .rz-pager .rz-state-active,
.app-shell.app-dark .rz-pager .rz-pager-item.rz-state-active,
.app-shell.app-dark .rz-paginator .rz-state-active {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: var(--app-dark-primary-strong) !important;
}

/* Roadmap and Plan late contrast fixes for generated/inline light-theme styles. */
.app-shell.app-dark [style*="background:#fafafa"],
.app-shell.app-dark [style*="background: #fafafa"],
.app-shell.app-dark [style*="background:#fef9c3"],
.app-shell.app-dark [style*="background: #fef9c3"],
.app-shell.app-dark [style*="background:#fee2e2"],
.app-shell.app-dark [style*="background: #fee2e2"],
.app-shell.app-dark [style*="background:#ffedd5"],
.app-shell.app-dark [style*="background: #ffedd5"] {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark [style*="color:#065f46"],
.app-shell.app-dark [style*="color: #065f46"],
.app-shell.app-dark [style*="color: rgb(6, 95, 70)"],
.app-shell.app-dark [style*="color:#ca8a04"],
.app-shell.app-dark [style*="color: #ca8a04"],
.app-shell.app-dark [style*="color: rgb(202, 138, 4)"] {
    color: #fde68a !important;
}

.app-shell.app-dark .sb-sprint-count {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
    border: 1px solid var(--app-dark-border-strong) !important;
}

.app-shell.app-dark #gantt-main,
.app-shell.app-dark #gantt-main [style*="background: rgb(255, 255, 255)"],
.app-shell.app-dark #gantt-main [style*="background:rgb(255, 255, 255)"],
.app-shell.app-dark #gantt-main [style*="background: rgb(248, 250, 252)"],
.app-shell.app-dark #gantt-main [style*="background:rgb(248, 250, 252)"],
.app-shell.app-dark #gantt-main [style*="background: white"],
.app-shell.app-dark #gantt-main [style*="background:white"] {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark #gantt-main [style*="color: rgb(15, 23, 42)"],
.app-shell.app-dark #gantt-main [style*="color:rgb(15, 23, 42)"],
.app-shell.app-dark #gantt-main [style*="color: rgb(30, 41, 59)"],
.app-shell.app-dark #gantt-main [style*="color:rgb(30, 41, 59)"] {
    color: var(--app-dark-title) !important;
    text-shadow: none !important;
}

.app-shell.app-dark #gantt-main [style*="color: rgb(100, 116, 139)"],
.app-shell.app-dark #gantt-main [style*="color:rgb(100, 116, 139)"],
.app-shell.app-dark #gantt-main [style*="color: rgb(148, 163, 184)"],
.app-shell.app-dark #gantt-main [style*="color:rgb(148, 163, 184)"] {
    color: var(--app-dark-muted) !important;
}

.app-shell.app-dark #gantt-main [style*="background: rgb(245, 245, 245)"],
.app-shell.app-dark #gantt-main [style*="background:rgb(245, 245, 245)"],
.app-shell.app-dark #gantt-main [style*="background: whitesmoke"],
.app-shell.app-dark #gantt-main [style*="background:whitesmoke"] {
    background: #334155 !important;
    color: var(--app-dark-title) !important;
    border-color: #64748b !important;
}

.app-shell.app-dark #gantt-main [style*="background: rgb(224, 231, 240)"],
.app-shell.app-dark #gantt-main [style*="background:rgb(224, 231, 240)"],
.app-shell.app-dark #gantt-main [style*="background: rgb(218, 225, 246)"],
.app-shell.app-dark #gantt-main [style*="background:rgb(218, 225, 246)"] {
    background: #1e3a8a !important;
    color: #dbeafe !important;
    border-color: #60a5fa !important;
}

.app-shell.app-dark .sb-plan-summary-header {
    background: linear-gradient(135deg, var(--app-dark-surface-2) 0%, var(--app-dark-surface) 100%) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.app-shell.app-dark .sb-plan-summary-header__title,
.app-shell.app-dark .sb-plan-summary-header__metric strong,
.app-shell.app-dark .sb-plan-summary-header__progress-label strong {
    color: var(--app-dark-primary);
}

.app-shell.app-dark .sb-plan-summary-header__metric small,
.app-shell.app-dark .sb-plan-summary-header__progress-label {
    color: var(--app-dark-muted);
}

.app-shell.app-dark .sb-plan-summary-header__count {
    background: var(--app-dark-surface-3);
    color: var(--app-dark-title);
}

.app-shell.app-dark .sb-plan-summary-header__divider,
.app-shell.app-dark .sb-plan-summary-header__progress-track {
    background: var(--app-dark-border-strong);
}

.app-shell.app-dark .sb-plan-summary-header__filters {
    border-color: var(--app-dark-border-strong);
}

.app-shell.app-dark .sb-plan-summary-header [style*="color:#4c1d95"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#5b21b6"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#7c3aed"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#0e7490"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#2563a8"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #4c1d95"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #5b21b6"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #7c3aed"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #0e7490"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #2563a8"] {
    color: var(--app-dark-primary) !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="color:#6b7280"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #6b7280"] {
    color: var(--app-dark-muted) !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="background:#ede9fe"],
.app-shell.app-dark .sb-plan-summary-header [style*="background: #ede9fe"] {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-title) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="background:#c4b5fd"],
.app-shell.app-dark .sb-plan-summary-header [style*="background: #c4b5fd"] {
    background: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="border-top:1px solid #c4b5fd"],
.app-shell.app-dark .sb-plan-summary-header [style*="border-top: 1px solid #c4b5fd"] {
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="background:#d1fae5"],
.app-shell.app-dark .sb-plan-summary-header [style*="background: #d1fae5"] {
    background: #14532d !important;
    color: #bbf7d0 !important;
    border-color: #22c55e !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="background:#fff7ed"],
.app-shell.app-dark .sb-plan-summary-header [style*="background: #fff7ed"] {
    background: #7c2d12 !important;
    color: #fed7aa !important;
    border-color: #fb923c !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="color:#065f46"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #065f46"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#10b981"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #10b981"] {
    color: #bbf7d0 !important;
}

.app-shell.app-dark .sb-plan-summary-header [style*="color:#c2410c"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #c2410c"],
.app-shell.app-dark .sb-plan-summary-header [style*="color:#f97316"],
.app-shell.app-dark .sb-plan-summary-header [style*="color: #f97316"] {
    color: #fed7aa !important;
}

.app-shell.app-dark .rm-modal,
.app-shell.app-dark .rm-panel,
.app-shell.app-dark .rm-drag-card,
.app-shell.app-dark .rm-toolbar-btn,
.app-shell.app-dark .rm-tab,
.app-shell.app-dark .rm-add-ms-btn {
    background: var(--app-dark-surface) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,.48) !important;
}

.app-shell.app-dark .rm-panel-hdr,
.app-shell.app-dark .rm-modal [style*="border-top:1px solid #f1f5f9"],
.app-shell.app-dark .rm-modal [style*="border-top: 1px solid #f1f5f9"],
.app-shell.app-dark .rm-modal [style*="border-bottom:1px solid #e2e8f0"],
.app-shell.app-dark .rm-modal [style*="border-bottom: 1px solid #e2e8f0"] {
    background: var(--app-dark-surface-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

.app-shell.app-dark .rm-modal h6,
.app-shell.app-dark .rm-modal .rm-label,
.app-shell.app-dark .rm-panel h6,
.app-shell.app-dark .rm-panel .rm-label {
    color: var(--app-dark-title) !important;
}

.app-shell.app-dark .rm-modal p,
.app-shell.app-dark .rm-modal span,
.app-shell.app-dark .rm-panel p,
.app-shell.app-dark .rm-panel span {
    color: inherit;
}

.app-shell.app-dark .rm-modal [style*="background:#faf5ff"],
.app-shell.app-dark .rm-modal [style*="background: #faf5ff"],
.app-shell.app-dark .rm-modal [style*="background:#fef3c7"],
.app-shell.app-dark .rm-modal [style*="background: #fef3c7"],
.app-shell.app-dark .rm-modal [style*="background:#fef2f2"],
.app-shell.app-dark .rm-modal [style*="background: #fef2f2"] {
    background: var(--app-dark-surface-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-strong) !important;
}

.app-shell.app-dark .rm-modal [style*="color:#92400e"],
.app-shell.app-dark .rm-modal [style*="color: #92400e"],
.app-shell.app-dark .rm-modal [style*="color:#b45309"],
.app-shell.app-dark .rm-modal [style*="color: #b45309"] {
    color: #fde68a !important;
}

.app-shell.app-dark .rm-modal [style*="color:#dc2626"],
.app-shell.app-dark .rm-modal [style*="color: #dc2626"],
.app-shell.app-dark .rm-modal [style*="color:#7c3aed"],
.app-shell.app-dark .rm-modal [style*="color: #7c3aed"],
.app-shell.app-dark .rm-modal [style*="color:#0369a1"],
.app-shell.app-dark .rm-modal [style*="color: #0369a1"] {
    color: var(--app-dark-primary) !important;
}

.app-shell:not(.app-dark) .dash-recent-id,
.app-shell:not(.app-dark) .dash-recent-date,
.app-shell:not(.app-dark) .sol-empty,
.app-shell:not(.app-dark) .intake-label,
.app-shell:not(.app-dark) .jira-card-id,
.app-shell:not(.app-dark) .sb-card-id,
.app-shell:not(.app-dark) .sb-detail-label,
.app-shell:not(.app-dark) .attachment-size,
.app-shell:not(.app-dark) .settings-empty,
.app-shell:not(.app-dark) .settings-hint,
.app-shell:not(.app-dark) .vel-subtitle,
.app-shell:not(.app-dark) .vel-muted,
.app-shell:not(.app-dark) .rz-dropdown-label.rz-placeholder,
.app-shell:not(.app-dark) .rz-inputtext.rz-placeholder,
.app-shell:not(.app-dark) [style*="color:#94a3b8"],
.app-shell:not(.app-dark) [style*="color: #94a3b8"],
.app-shell:not(.app-dark) [style*="color:#9ca3af"],
.app-shell:not(.app-dark) [style*="color: #9ca3af"],
.app-shell:not(.app-dark) [style*="color:#adb5bd"],
.app-shell:not(.app-dark) [style*="color: #adb5bd"],
.app-shell:not(.app-dark) [style*="color:#cbd5e1"],
.app-shell:not(.app-dark) [style*="color: #cbd5e1"],
.app-shell:not(.app-dark) [style*="color:#64748b"],
.app-shell:not(.app-dark) [style*="color: #64748b"],
.app-shell:not(.app-dark) [style*="color: rgb(148, 163, 184)"],
.app-shell:not(.app-dark) [style*="color:rgb(148, 163, 184)"],
.app-shell:not(.app-dark) [style*="color: rgb(156, 163, 175)"],
.app-shell:not(.app-dark) [style*="color:rgb(156, 163, 175)"],
.app-shell:not(.app-dark) [style*="color: rgb(173, 181, 189)"],
.app-shell:not(.app-dark) [style*="color:rgb(173, 181, 189)"],
.app-shell:not(.app-dark) [style*="color: rgb(203, 213, 225)"],
.app-shell:not(.app-dark) [style*="color:rgb(203, 213, 225)"],
.app-shell:not(.app-dark) [style*="color: rgb(100, 116, 139)"],
.app-shell:not(.app-dark) [style*="color:rgb(100, 116, 139)"] {
    color: #475569 !important;
}

.app-shell:not(.app-dark) .dlg-label,
.app-shell:not(.app-dark) .dlg-hint {
    color: #475569 !important;
}

.app-shell:not(.app-dark) .dlg-required,
.app-shell:not(.app-dark) [style*="color:#ef4444"],
.app-shell:not(.app-dark) [style*="color: #ef4444"],
.app-shell:not(.app-dark) [style*="color:#dc2626"],
.app-shell:not(.app-dark) [style*="color: #dc2626"] {
    color: #991b1b !important;
}

.app-shell:not(.app-dark) [style*="color:#f97316"],
.app-shell:not(.app-dark) [style*="color: #f97316"] {
    color: #9a3412 !important;
}

.app-shell:not(.app-dark) [style*="color:#16a34a"],
.app-shell:not(.app-dark) [style*="color: #16a34a"],
.app-shell:not(.app-dark) [style*="color:#10b981"],
.app-shell:not(.app-dark) [style*="color: #10b981"] {
    color: #166534 !important;
}

.app-shell:not(.app-dark) [style*="color:#0ea5e9"],
.app-shell:not(.app-dark) [style*="color: #0ea5e9"],
.app-shell:not(.app-dark) [style*="color:#0369a1"],
.app-shell:not(.app-dark) [style*="color: #0369a1"] {
    color: #075985 !important;
}

.app-shell:not(.app-dark) [style*="color:#8b5cf6"],
.app-shell:not(.app-dark) [style*="color: #8b5cf6"],
.app-shell:not(.app-dark) [style*="color:#6366f1"],
.app-shell:not(.app-dark) [style*="color: #6366f1"] {
    color: #3730a3 !important;
}

.app-shell:not(.app-dark) .rm-icon-btn,
.app-shell:not(.app-dark) .rm-toolbar-btn,
.app-shell:not(.app-dark) .rm-tab {
    color: #475569 !important;
}

.app-shell:not(.app-dark) .rm-icon-btn .material-icons,
.app-shell:not(.app-dark) .rm-toolbar-btn .material-icons,
.app-shell:not(.app-dark) .rm-tab .material-icons {
    color: inherit !important;
}

.app-shell:not(.app-dark) .jira-col-count,
.app-shell:not(.app-dark) .sb-count-pill,
.app-shell:not(.app-dark) .vel-badge--grey {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

.app-shell:not(.app-dark) .jira-children-badge,
.app-shell:not(.app-dark) .jira-tag,
.app-shell:not(.app-dark) .board-tag {
    background: #e0e7ff !important;
    color: #3730a3 !important;
}

.app-shell:not(.app-dark) .sol-count {
    background: #6d28d9 !important;
    color: #ffffff !important;
}

.app-shell:not(.app-dark) .vel-badge--green,
.app-shell:not(.app-dark) .chip--green,
.app-shell:not(.app-dark) .sb-stat-chip--done,
.app-shell:not(.app-dark) .sb-stat-chip--capacity {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.app-shell:not(.app-dark) .vel-badge--red,
.app-shell:not(.app-dark) .app-alert--error {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.app-shell:not(.app-dark) .wi-type-icon[style*="color:#ef4444"],
.app-shell:not(.app-dark) .wi-type-icon[style*="color: #ef4444"] {
    color: #991b1b !important;
}

.app-shell:not(.app-dark) .wi-type-icon[style*="color:#8b5cf6"],
.app-shell:not(.app-dark) .wi-type-icon[style*="color: #8b5cf6"] {
    color: #5b21b6 !important;
}

.app-shell:not(.app-dark) .wi-type-icon[style*="color:#0ea5e9"],
.app-shell:not(.app-dark) .wi-type-icon[style*="color: #0ea5e9"] {
    color: #075985 !important;
}

.app-shell:not(.app-dark) .wi-type-icon[style*="color:#9ca3af"],
.app-shell:not(.app-dark) .wi-type-icon[style*="color: #9ca3af"] {
    color: #4b5563 !important;
}

.app-shell:not(.app-dark) .settings-dialog .appbar-search-clear,
.app-shell:not(.app-dark) .modal-panel .appbar-search-clear,
.app-shell:not(.app-dark) .side-drawer .appbar-search-clear,
.app-shell:not(.app-dark) .detail-drawer .appbar-search-clear,
.app-shell:not(.app-dark) .idea-so-panel .appbar-search-clear {
    color: #475569 !important;
    opacity: 1 !important;
}

.app-shell:not(.app-dark) .settings-dialog .appbar-search-clear:hover,
.app-shell:not(.app-dark) .modal-panel .appbar-search-clear:hover,
.app-shell:not(.app-dark) .side-drawer .appbar-search-clear:hover,
.app-shell:not(.app-dark) .detail-drawer .appbar-search-clear:hover,
.app-shell:not(.app-dark) .idea-so-panel .appbar-search-clear:hover {
    color: #0f172a !important;
}

/* ─── Backlog Management ────────────────────────────────────────────────── */
.bm-page { display: flex; flex-direction: column; height: calc(100vh - 82px); min-height: 560px; margin: -12px; background: #f8fafc; }
.bm-header,
.bm-heading,
.bm-header-actions,
.bm-list-toolbar,
.bm-group-control,
.bm-item-title-line,
.bm-findings,
.bm-action-bar,
.bm-dialog header,
.bm-dialog footer {
    display: flex;
    align-items: center;
}
.bm-header { min-height: 58px; flex: 0 0 auto; justify-content: flex-start; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #cbd5e1; background: #fff; }
.bm-back-button { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155; cursor: pointer; }
.bm-back-button:hover { border-color: #94a3b8; background: #f8fafc; }
.bm-back-button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.bm-heading { gap: 9px; min-width: 0; }
.bm-heading > .rz-icon { color: #0f766e; font-size: 1.35rem; }
.bm-heading h1 { margin: 0; color: #172033; font-size: 1.05rem; font-weight: 750; }
.bm-kicker { color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.bm-header-actions { gap: 5px; margin-left: auto; }
.bm-content { display:flex; min-height:0; flex:1; flex-direction:column; overflow:hidden; padding:0 18px 18px; }
.bm-page--has-selection .bm-content { padding-bottom:88px; }
.bm-loading { display: flex; align-items: center; justify-content: center; min-height: 260px; color: #64748b; font-size: .82rem; }
.bm-loading-panel { display: grid; width: min(440px, 90vw); gap: 10px; padding: 20px; }
.bm-loading-heading { display: flex; align-items: center; gap: 8px; color: #334155; }
.bm-loading-heading .rz-icon { color: #0f766e; font-size: 1.15rem; }
.bm-loading-heading > span { margin-left: auto; color: #0f766e; font-weight: 750; }
.bm-loading-status { color: #64748b; font-size: .75rem; text-align: center; }
.bm-analysis-tabs { display: grid; grid-template-columns: repeat(6, minmax(96px, 1fr)); flex:0 0 auto; margin: 14px 0 10px; border: 1px solid #d7dee8; border-radius: 6px; overflow: hidden; }
.bm-analysis-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 7px 10px; border: 0; border-right: 1px solid #d7dee8; background: #fff; color: #526075; font-size: .75rem; cursor: pointer; }
.bm-analysis-tab:last-child { border-right: 0; }
.bm-analysis-tab strong { min-width: 22px; padding: 1px 5px; border-radius: 10px; background: #edf1f5; color: #334155; font-size: .68rem; text-align: center; }
.bm-analysis-tab:hover { background: #f7fafc; }
.bm-analysis-tab--active { background: #e9f6f2; color: #116b59; box-shadow: inset 0 -3px #16836b; font-weight: 700; }
.bm-analysis-tab--active strong { background: #16836b; color: #fff; }
.bm-controls { display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(140px, .7fr)); flex:0 0 auto; gap: 7px; margin-bottom: 10px; }
.bm-controls > .rz-dropdown { width: 100%; min-width: 0; font-size: .78rem; }
.bm-search { display: flex; align-items: center; gap: 7px; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #cfd7e3; border-radius: 5px; background: #fff; }
.bm-search .rz-icon { flex-shrink: 0; color: #738095; font-size: 1rem; }
.bm-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #1e293b; font-size: .78rem; }
.bm-list-toolbar { min-height: 36px; gap: 12px; padding: 5px 8px; border-block: 1px solid #e2e8f0; color: #64748b; font-size: .72rem; }
.bm-select-all { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.bm-group-control { min-width: 0; margin-left: auto; gap: 6px; }
.bm-group-control > label { flex: 0 0 auto; color: #7c8799; font-weight: 600; text-transform: uppercase; font-size: .64rem; }
.bm-group-control > .rz-dropdown { width: 128px; min-width: 0; font-size: .7rem; }
.bm-split { display:flex; min-height:0; flex:1; overflow:hidden; border:1px solid #cbd5e1; background:#fff; }
.bm-list-pane { display:flex; width:36%; min-width:280px; flex:0 0 auto; flex-direction:column; min-height:0; background:#fff; }
.bm-list-scroll { min-height:0; flex:1; overflow:auto; }
.bm-pagination { display:flex; min-height:42px; flex:0 0 auto; align-items:center; gap:8px; padding:6px 8px; border-top:1px solid #e2e8f0; background:#fff; color:#64748b; font-size:.7rem; }
.bm-pagination-range { min-width:78px; font-weight:650; }
.bm-pagination-controls { display:flex; align-items:center; gap:2px; margin-left:auto; }
.bm-pagination-controls > button { display:grid; width:28px; height:28px; place-items:center; padding:0; border:1px solid transparent; border-radius:4px; background:transparent; color:#475569; cursor:pointer; }
.bm-pagination-controls > button:hover:not(:disabled) { border-color:#cbd5e1; background:#f1f5f9; }
.bm-pagination-controls > button:disabled { color:#cbd5e1; cursor:not-allowed; }
.bm-pagination-controls .rz-icon { font-size:1rem; }
.bm-pagination-controls > span { min-width:72px; padding:0 4px; text-align:center; }
.bm-pagination > select { height:28px; padding:0 5px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#475569; font-size:.68rem; }
.bm-resizer { position:relative; width:8px; min-height:100%; flex:0 0 8px; padding:0; border:0; border-right:1px solid #cbd5e1; border-left:1px solid #cbd5e1; background:#e2e8f0; cursor:col-resize; touch-action:none; }
.bm-resizer::after { position:absolute; top:50%; left:50%; width:2px; height:36px; border-radius:2px; background:#94a3b8; content:""; transform:translate(-50%, -50%); }
.bm-resizer:hover,
.bm-resizer:focus-visible,
.bm-resizer.plan-workspace-resizer--active { background:#bfdbfe; outline:none; }
.bm-detail-pane { min-width:0; flex:1; overflow:auto; padding:12px; background:#fff; }
.bm-empty--detail { height:100%; min-height:280px; align-content:center; }
.bm-groups { display: grid; gap: 13px; padding:10px; }
.bm-group { border-top: 2px solid #b8c3d1; }
.bm-group > header { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 9px; background: #f5f7fa; color: #334155; font-size: .76rem; }
.bm-group > header span { min-width: 20px; padding: 0 5px; border-radius: 9px; background: #dfe5ec; color: #526075; font-size: .66rem; text-align: center; }
.bm-list { display:grid; gap:6px; }
.bm-row { display:grid; grid-template-columns:24px 30px minmax(0, 1fr) 30px; align-items:start; gap:8px; min-height:92px; padding:8px 9px; border:1px solid #e6ebf1; border-radius:5px; background:#fff; cursor:pointer; }
.bm-row:hover { background: #f8fafc; }
.bm-row--selected { background: #edf8f5; box-shadow: inset 3px 0 #16836b; }
.bm-row--active { border-color:#60a5fa; background:#eff6ff; box-shadow:inset 3px 0 #2563eb; }
.bm-row:focus-visible { outline:2px solid #2563eb; outline-offset:1px; }
.bm-row-select { display: grid; place-items: center; margin: 0; }
.bm-open-modal { display:grid; place-items:center; }
.bm-type-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 4px; }
.bm-type-icon .rz-icon { font-size: .95rem; }
.bm-item-main { min-width: 0; }
.bm-item-title-line { gap: 7px; min-width: 0; }
.bm-item-title-line strong { overflow: hidden; color: #1e293b; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.bm-item-id { flex-shrink: 0; color: #64748b; font: 700 .68rem monospace; }
.bm-ado-badge { flex-shrink: 0; padding: 1px 4px; border: 1px solid #9fc7e6; border-radius: 3px; color: #075985; font-size: .58rem; font-weight: 800; }
.bm-findings { gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.bm-finding { display: inline-flex; align-items: center; gap: 3px; min-height: 19px; padding: 1px 5px; border-radius: 3px; font-size: .62rem; font-weight: 700; }
.bm-finding .rz-icon { font-size: .72rem; }
.bm-finding small { font-size: .57rem; opacity: .8; }
.bm-finding--duplicate { background: #fee2e2; color: #991b1b; }
.bm-finding--similar { background: #e0f2fe; color: #075985; }
.bm-finding--implemented { background: #dcfce7; color: #166534; }
.bm-finding--deprecated { background: #f1f5f9; color: #475569; }
.bm-finding--superseded { background: #fef3c7; color: #92400e; }
.bm-finding--clear { background: #ecfdf5; color: #047857; }
.bm-evidence { margin-top: 3px; overflow: hidden; color: #778398; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.bm-evidence span { color: #475569; }
.bm-item-meta { display:grid; grid-column:3 / -1; grid-row:2; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:3px 8px; min-width:0; color:#64748b; font-size:.66rem; }
.bm-item-meta > span { display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-item-meta .rz-icon { flex-shrink: 0; font-size: .75rem; }
.bm-state { width: fit-content; padding: 1px 5px; border-radius: 3px; background: #edf1f5; color: #334155; font-weight: 700; }
.bm-empty { display: grid; justify-items: center; gap: 5px; padding: 64px 16px; color: #8a96a8; text-align: center; }
.bm-empty .rz-icon { font-size: 2rem; color: #78a99a; }
.bm-empty strong { color: #475569; font-size: .86rem; }
.bm-empty span { font-size: .73rem; }
.bm-action-bar { position: fixed; z-index: 190; right: 24px; bottom: 20px; left: max(24px, calc(var(--sidebar-width, 0px) + 24px)); justify-content: center; gap: 6px; min-height: 52px; padding: 8px 12px; border: 1px solid #bdc8d5; border-radius: 6px; background: #fff; box-shadow: 0 9px 30px rgba(15, 23, 42, .18); }
.bm-action-bar > strong { margin-right: 8px; color: #334155; font-size: .75rem; }
.bm-clear-selection { display: grid; place-items: center; width: 30px; height: 30px; margin-left: 4px; border: 0; border-radius: 4px; background: transparent; color: #64748b; cursor: pointer; }
.bm-clear-selection:hover { background: #edf1f5; color: #1e293b; }
.bm-clear-selection .material-icons { font-size: 17px; }
.bm-dialog { width: min(500px, 94vw); max-width: 500px; overflow: visible; }
.bm-dialog--wide { width: min(760px, 94vw); max-width: 760px; }
.bm-dialog header { gap: 8px; margin-bottom: 16px; color: #1e293b; }
.bm-dialog header .rz-icon { color: #0f766e; }
.bm-dialog > label,
.bm-edit-grid label { display: block; margin-bottom: 5px; color: #526075; font-size: .72rem; font-weight: 700; }
.bm-dialog p { margin: 12px 0 0; color: #64748b; font-size: .76rem; line-height: 1.5; }
.bm-dialog footer { justify-content: flex-end; gap: 7px; margin-top: 18px; }
.bm-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bm-area-editor { grid-column: 1 / -1; }
.bm-area-editor > label { display: flex; align-items: center; gap: 6px; }
.bm-access-denied { display: grid; justify-items: center; gap: 6px; padding: 80px 16px; color: #64748b; text-align: center; }
.bm-access-denied .rz-icon { font-size: 2.5rem; color: #94a3b8; }
.bm-access-denied h2 { margin: 5px 0 0; color: #334155; font-size: 1rem; }
.bm-access-denied p { margin: 0; font-size: .78rem; }

.app-shell.app-dark .bm-header,
.app-shell.app-dark .bm-list-toolbar { border-color: var(--app-dark-border); }
.app-shell.app-dark .bm-page { background: var(--app-dark-bg); }
.app-shell.app-dark .bm-header,
.app-shell.app-dark .bm-back-button { background: var(--app-dark-surface); }
.app-shell.app-dark .bm-back-button { color: var(--app-dark-text); }
.app-shell.app-dark .bm-heading h1,
.app-shell.app-dark .bm-item-title-line strong,
.app-shell.app-dark .bm-dialog header { color: var(--app-dark-title); }
.app-shell.app-dark .bm-analysis-tabs,
.app-shell.app-dark .bm-search,
.app-shell.app-dark .bm-split,
.app-shell.app-dark .bm-list-pane,
.app-shell.app-dark .bm-detail-pane,
.app-shell.app-dark .bm-row,
.app-shell.app-dark .bm-action-bar,
.app-shell.app-dark .bm-dialog { border-color: var(--app-dark-border); background: var(--app-dark-surface); }
.app-shell.app-dark .bm-pagination,
.app-shell.app-dark .bm-pagination > select { border-color:var(--app-dark-border); background:var(--app-dark-surface); color:var(--app-dark-muted); }
.app-shell.app-dark .bm-analysis-tab { border-color: var(--app-dark-border); background: var(--app-dark-surface); color: var(--app-dark-muted); }
.app-shell.app-dark .bm-analysis-tab:hover,
.app-shell.app-dark .bm-row:hover,
.app-shell.app-dark .bm-group > header { background: var(--app-dark-surface-2); }
.app-shell.app-dark .bm-analysis-tab--active,
.app-shell.app-dark .bm-row--selected { background: #123b35; color: #a7f3d0; }
.app-shell.app-dark .bm-row--active { border-color:#60a5fa; background:#172554; color:#dbeafe; }
.app-shell.app-dark .bm-search input { color: var(--app-dark-text); }
.app-shell.app-dark .bm-group { border-color: var(--app-dark-border-strong); }
.app-shell.app-dark .bm-row { border-color: var(--app-dark-border); }
.app-shell.app-dark .bm-group > header,
.app-shell.app-dark .bm-item-meta,
.app-shell.app-dark .bm-evidence,
.app-shell.app-dark .bm-dialog p { color: var(--app-dark-muted); }

@media (max-width: 1050px) {
    .bm-analysis-tabs { grid-template-columns: repeat(3, 1fr); }
    .bm-analysis-tab:nth-child(3) { border-right: 0; }
    .bm-analysis-tab:nth-child(-n+3) { border-bottom: 1px solid #d7dee8; }
    .bm-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bm-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .bm-page { height: auto; min-height: calc(100vh - 72px); }
    .bm-header { align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; }
    .bm-heading { flex: 1; }
    .bm-content,
    .bm-page--has-selection .bm-content { overflow:visible; padding:0 12px 18px; }
    .bm-analysis-tabs { grid-template-columns: repeat(2, 1fr); }
    .bm-analysis-tab:nth-child(3) { border-right: 1px solid #d7dee8; }
    .bm-analysis-tab:nth-child(even) { border-right: 0; }
    .bm-analysis-tab:nth-child(-n+4) { border-bottom: 1px solid #d7dee8; }
    .bm-controls,
    .bm-edit-grid { grid-template-columns: minmax(0, 1fr); }
    .bm-search,
    .bm-area-editor { grid-column: auto; }
    .bm-list-toolbar { align-items: flex-start; flex-wrap: wrap; }
    .bm-pagination { flex-wrap:wrap; }
    .bm-pagination-controls { order:3; width:100%; justify-content:center; margin-left:0; }
    .bm-group-control { width: 100%; margin-left: 0; }
    .bm-group-control > .rz-dropdown { flex: 1; width: auto; }
    .bm-split { flex-direction:column; overflow:visible; }
    .bm-list-pane { width:auto !important; height:44vh; min-height:300px; border-bottom:1px solid #cbd5e1; }
    .bm-resizer { display:none; }
    .bm-detail-pane { min-height:58vh; overflow:visible; }
    .bm-action-bar { position:static; right:auto; bottom:auto; left:auto; width:100%; flex:0 0 auto; justify-content:flex-start; margin-bottom:10px; overflow-x:auto; box-shadow:none; }
    .bm-action-bar > strong { display: none; }
}
