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

/* ─── 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; }

/* 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: 780px;
    margin: 0 auto;
    padding: 24px 16px;
}
.settings-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.settings-tabs {
    display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px; overflow-x: auto;
}
.settings-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; font-size: .85rem; font-weight: 500;
    color: #64748b; background: transparent; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s;
}
.settings-tab:hover { color: #1e293b; }
.settings-tab--active { color: var(--rz-primary, #3b82f6); border-bottom-color: var(--rz-primary, #3b82f6); }
.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;
}
.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; }

/* ─── 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-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;
}

/* 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: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid #f1f5f9;
}
.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;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.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;
}

/* 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 selector ──────────────────────────────── */
.appbar-project-select .mud-input {
    color: rgba(255,255,255,0.92) !important;
    caret-color: white;
}
.appbar-project-select .mud-input::before,
.appbar-project-select .mud-input::after {
    border-bottom-color: rgba(255,255,255,0.4) !important;
}
.appbar-project-select .mud-icon-button,
.appbar-project-select .mud-input-adornment .mud-svg-icon,
.appbar-project-select .mud-select-icon {
    color: rgba(255,255,255,0.85) !important;
}
.appbar-project-select .mud-input-label {
    color: rgba(255,255,255,0.7) !important;
}
.appbar-project-select .mud-input-slot {
    color: rgba(255,255,255,0.92) !important;
}
.appbar-project-select input {
    color: rgba(255,255,255,0.92) !important;
}
.appbar-project-select { min-width: 160px; }

/* ── 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-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; }

/* ── 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: center; justify-content: space-between; padding: 12px 16px; 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 { padding: 0 16px 8px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
/* \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: 160px; 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; }
.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; }
.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: hidden; }
.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; }

/* ── 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; }

/* ── 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; }

/* ── 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; }
.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)
═══════════════════════════════════════════════════ */

.idea-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

/* ── Idea card wrapper (replaces flat row — wraps top-row + desc panel) */
.idea-card {
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}
.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 1: pills strip */
.idea-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    min-height: 22px;
    cursor: pointer;
    user-select: none;
}
.idea-row--pills { padding: 5px 10px 2px; }
.idea-row--title { padding: 1px 10px 6px 34px; min-height: auto; }

/* ── Row 2: description panel (shown when expanded) */
.idea-desc-panel {
    padding: 0 12px 10px 34px;
    font-size: .82rem;
    color: #374151;
    line-height: 1.55;
    border-top: 1px solid #f1f5f9;
}
.idea-desc-panel > * { max-width: 100%; }
.idea-desc-empty {
    font-style: italic; color: #94a3b8; font-size: .78rem;
}

/* Column sizing */
.idea-col-expand    { width: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #94a3b8; }
.idea-col-prio      { width: 12px; 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: 22px; flex-shrink: 0; display: flex; justify-content: center; }
.idea-col-time      { width: 52px; flex-shrink: 0; text-align: right; }
.idea-col-actions   { flex-shrink: 0; display: flex; align-items: center; gap: 1px; }

/* ── Icon-only action buttons */
.idea-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: #94a3b8;
    transition: all .12s;
    padding: 0;
    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; }

/* ── 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: .82rem;
    font-weight: 500;
    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);
}

/* ─── 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); }

/* ─── Drag-over drop zone ─────────────────────────────────────────────────── */
.idea-drop-zone--active {
    background: #eff6ff;
    border-radius: 8px;
    outline: 2px dashed #3b82f6;
    outline-offset: -2px;
}

/* ─── 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); }
}
.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; }
}
