html, body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* The single scrolling region for ordinary pages. The layout shell (.page/main)
   is fixed to the viewport, so this is what scrolls rather than the window. */
.content {
    padding-top: 1.1rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Fill mode — opt-in for full-page data grids (Driver Backlog, Core Backlog, …).
   A page opts in by adding .fill to its .table-scroll-container; the article then
   stops scrolling and becomes a flex column so the grid can claim exactly the
   leftover height. That removes the second (window) scrollbar entirely, which
   otherwise makes the table's horizontal scrollbar very hard to reach. */
.content:has(> .table-scroll-container.fill) {
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 0.75rem;
}

    /* Toolbars, filter rows and alerts keep their natural height… */
    .content:has(> .table-scroll-container.fill) > * {
        flex: 0 0 auto;
    }

    /* …and the grid absorbs whatever height is left over. */
    .content > .table-scroll-container.fill {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Login page layout */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card {
    border: none;
    border-radius: 0.5rem;
}

/* User info in the top bar */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.user-info .user-role {
    color: #6c757d;
    font-size: 0.75rem;
}

/* Summary metric cards shown above the backlog table */
.summary-card {
    background-color: #f0f4f8;
    border: 1px solid #d5dce4;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    text-align: center;
    min-width: 7rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f4e79;
    line-height: 1.3;
}

.summary-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Scrollable container for the backlog table.
   Keeps the toolbar/filters always visible while the table scrolls both
   horizontally (wide columns) and vertically (many rows).
   Sticky headers work within this container at top: 0. */
.table-scroll-container {
    overflow-y: auto;
    overflow-x: scroll;
    max-height: calc(100vh - 13rem);
    border: 1px solid #d5dce4;
    border-radius: 3px;
}

/* Backlog grid styles — standalone table (no Bootstrap .table class which
   forces border-collapse: collapse and breaks position: sticky on thead). */
.backlog-table {
    table-layout: fixed;
    font-size: 0.875rem;
    line-height: 1.4;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Cell padding — enough room to read without wasting space */
.backlog-table td,
.backlog-table th {
    padding: 0.35rem 0.5rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Opt-out for cells that host an absolutely-positioned pop-out (e.g. the "..." row
   actions menu). The ellipsis rule above clips overflow on every cell, which would
   otherwise crop the menu to the height of its own row. Apply only to cells whose
   content is fixed-width controls, never to ones holding truncatable text. */
.backlog-table td.cell-overflow-visible {
    overflow: visible;
}

/* Column widths are authoritative. With table-layout:fixed the browser sizes
   columns from the header row, but padding/borders would otherwise be added on
   top of the declared width. border-box keeps a column exactly as wide as its
   style="width:Npx" says, so widths stay stable across renders and the table
   scrolls horizontally rather than redistributing space between columns. */
.backlog-table th,
.backlog-table td {
    box-sizing: border-box;
}

/* Column resize drag handle — invisible bar on the right edge of each header */
.col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    z-index: 11;
}

.col-resize-handle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Visual feedback while actively resizing */
.col-resizing {
    background-color: #2a6399 !important;
}

/* Cell borders — with border-collapse: separate we use right+bottom on each cell
   and left+top on the table itself to avoid doubled borders. */
.backlog-table {
    border-top: 1px solid #d5dce4;
    border-left: 1px solid #d5dce4;
}

.backlog-table td,
.backlog-table th {
    border-right: 1px solid #d5dce4;
    border-bottom: 1px solid #d5dce4;
}

/* Dark blue header row — matches the spreadsheet header.
   Sticky: stays pinned below the top-row bar when scrolling.
   top: 3.5rem = height of the .top-row nav bar. */
.backlog-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: default;
    user-select: none;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #1f4e79;
    color: #ffffff;
    border-color: #163d5e;
    /* Ensure header fully covers scrolled content underneath. */
    box-shadow: 0 1px 0 #163d5e;
}

.backlog-table th.sortable {
    cursor: pointer;
}

.backlog-table th.sortable:hover {
    background-color: #2a6399;
}

/* Sort direction indicators */
.backlog-table th.sort-asc::after {
    content: " ▲";
    font-size: 0.75rem;
}

.backlog-table th.sort-desc::after {
    content: " ▼";
    font-size: 0.75rem;
}

/* Editable priority box — typing a rank is far quicker than stepping with the arrows
   once the list runs to 30+ features. Sized to fit a 3-digit rank in the 80px column. */
.priority-input {
    width: 4.5rem;
    margin: 0 auto;
    text-align: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Phase completion bar — deliberately slim so the five phase columns stay scannable. */
.phase-progress {
    height: 6px;
    margin-top: 0.25rem;
    background-color: #e9ecef;
}

.phase-progress .progress-bar {
    background-color: #2a6399;
}

/* Active phase cell in the Features list.

   All five phases now get their own column, so the percentages alone no longer tell you which
   phase a feature is actually sitting in. This tints that one cell. It is cell-scoped rather
   than reusing .row-current, which fills an entire row. */
.backlog-table td.phase-cell-current {
    background-color: #e8f0f9;
    box-shadow: inset 0 0 0 1px #b8cfe6;
}

/* Row overflow ("...") menu — holds the destructive row actions.

   Archive and Delete deliberately live behind this menu rather than sitting as bare
   buttons in the row: the Actions column is next to the reorder arrows, which get
   clicked repeatedly, and an adjacent one-click Archive was far too easy to hit by
   mistake. Two clicks is the point.

   The menu itself is a stock Bootstrap dropdown (see Features.razor). Escaping the clip
   box created by .table-scroll-container is harder than it looks, and two attempts
   failed in QA on InternalTools: Bootstrap's dropdown has NO "strategy" option, so
   data-bs-strategy="fixed" is silently ignored, and supplying a real popperConfig via
   data-bs-config did not help either — cell-overflow-visible lifts only the cell's
   clipping, while the scroll container clips independently and its max-height leaves
   little room beneath the last row. Prefer inline buttons for two or three actions
   (see InternalTools.razor); if a menu is genuinely needed, render it outside the
   scroll container. The elevation below is kept because the sticky thead sits at
   z-index 10, above Bootstrap's default dropdown z-index of 1000.

   Scoped to .backlog-table so this only affects menus opened from inside a data grid,
   which is the sole place the sticky-header conflict arises. Left global it would raise
   every dropdown in the app above elements that are meant to sit over them. */
.backlog-table .dropdown-menu {
    z-index: 1055;
}

/* Stack Rank column — distinct light blue background for easy scanning */
.backlog-table .col-stackrank {
    background-color: #d6eaf8;
    font-weight: 700;
    text-align: center;
}

/* Stack Rank header — slightly different shade to stand out in the header row */
.backlog-table thead th.col-stackrank {
    background-color: #2980b9;
}

/* ADO ticket ID link — visible but not distracting */
.ado-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.ado-link:hover {
    text-decoration: underline;
}

/* Preserve link color on highlighted rows */
.row-waiting-on-client .ado-link {
    color: #6b3a00;
}

.row-stuck .ado-link {
    color: #5c1018;
}

/* Waiting on Client rows (Product Priority = "0") — dark orange fill */
.backlog-table tr.row-waiting-on-client td {
    background-color: #f5b041 !important;
    color: #4a2800;
}

.backlog-table tr.row-waiting-on-client td.col-stackrank {
    background-color: #e59400 !important;
}

/* Stuck/blocked rows (Product Priority = "99") — subtle red tint */
.backlog-table tr.row-stuck td {
    background-color: #f8d7da !important;
    color: #721c24;
}

.backlog-table tr.row-stuck td.col-stackrank {
    background-color: #f1aeb5 !important;
}

/* Needs triage rows (no Story Points assigned yet) — light purple tint */
.backlog-table tr.row-needs-triage td {
    background-color: #e8dff5 !important;
    color: #4a2d7a;
}

.backlog-table tr.row-needs-triage td.col-stackrank {
    background-color: #d4bfed !important;
    font-weight: 700;
}

.row-needs-triage .ado-link {
    color: #4a2d7a;
}

/* Maintenance rows (Category = "Maintenance") — orange fill, same as Waiting on Client */
.backlog-table tr.row-maintenance td {
    background-color: #f5b041 !important;
    color: #4a2800;
}

.backlog-table tr.row-maintenance td.col-stackrank {
    background-color: #e59400 !important;
}

.row-maintenance .ado-link {
    color: #6b3a00;
}

/* Tiger Team rows (Category = "Tiger Team") — yellow fill */
.backlog-table tr.row-tiger-team td {
    background-color: #fce883 !important;
    color: #5a4b00;
}

.backlog-table tr.row-tiger-team td.col-stackrank {
    background-color: #f0d94e !important;
}

.row-tiger-team .ado-link {
    color: #5a4b00;
}

/* Current/highlighted row (e.g., current firmware version) — light green fill */
.backlog-table tr.row-current td {
    background-color: #d4edda !important;
    color: #155724;
}

/* Total / summary rows — light neutral fill with bold text */
.backlog-table tr.row-total td {
    background-color: #eef1f4 !important;
    font-weight: 700;
}

/* Missing / negative-state rows — light red fill */
.backlog-table tr.row-missing td {
    background-color: #f8d7da !important;
    color: #842029;
}

/* Severity: critical rows — light red fill */
.backlog-table tr.row-critical td {
    background-color: #f8d7da !important;
    color: #842029;
}

/* Severity: warning rows — light amber fill */
.backlog-table tr.row-warning td {
    background-color: #fff3cd !important;
    color: #664d03;
}

/* Subtle / secondary rows (e.g., version history) — light neutral fill */
.backlog-table tr.row-subtle td {
    background-color: #f5f6f8 !important;
    color: #6c757d;
}

/* Link group header rows — collapsible group headers for linked tickets */
.backlog-table tr.link-group-header td {
    background-color: #d6e9f8;
    border-top: 2px solid #4a90c4;
    border-bottom: 1px solid #b0cfe0;
    padding: 6px 10px;
    font-size: 0.875rem;
}

.backlog-table tr.link-group-header:hover td {
    filter: brightness(0.95);
}

/* Heavy border around linked ticket groups —
   thick left+right on every group row, thick top on the header, thick bottom on the last row. */
.backlog-table tr.link-group-border td:first-child {
    border-left: 3px solid #1f4e79;
}

.backlog-table tr.link-group-border td:last-child {
    border-right: 3px solid #1f4e79;
}

.backlog-table tr.link-group-header.link-group-border td {
    border-top: 3px solid #1f4e79;
}

.backlog-table tr.link-group-last td {
    border-bottom: 3px solid #1f4e79;
}

/* Release version group header rows — top-level collapsible groups */
.backlog-table tr.release-group-header td {
    background-color: #1f4e79;
    color: #fff;
    border-top: 2px solid #0d2f4f;
    border-bottom: 1px solid #3a7fc4;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.backlog-table tr.release-group-header:hover td {
    filter: brightness(1.15);
}

.release-group-header .group-toggle {
    font-size: 0.85rem;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    min-width: 16px;
    display: inline-block;
}

.release-group-header .text-muted {
    color: #b0cfe0 !important;
}

.link-group-header .group-toggle {
    font-size: 0.8rem;
    text-decoration: none;
    color: #1f4e79;
    cursor: pointer;
    min-width: 16px;
    display: inline-block;
}

/* Linked-group rows — inherit the pastel background-color set on the tr via inline style.
   Row-status classes (waiting, stuck, etc.) still override via !important on their td rules. */
.backlog-table tbody tr[style*="background-color"] td {
    background-color: inherit;
}

/* Hover — gentle darken on any row, works with all background colors */
.backlog-table tbody tr:hover td {
    filter: brightness(0.95);
}

/* Calculated field styling — subtle visual distinction */
.calculated-field {
    color: #495057;
    font-style: italic;
}

/* Unresolved account/MSP name — yellow highlight to flag names not in the account list */
.backlog-table td.unresolved-account {
    background-color: #fff3cd !important;
    color: #664d03;
    cursor: pointer;
}

.backlog-table td.unresolved-account:hover {
    background-color: #ffe69c !important;
}

/* Account/MSP cell with a resolved link — show link-style text */
.account-link {
    color: #0d6efd;
    text-decoration: none;
    cursor: pointer;
}

.account-link:hover {
    text-decoration: underline;
}

/* Inline link icon next to an editable account/MSP input */
.account-cell-wrapper {
    display: flex;
    align-items: center;
    gap: 3px;
}

.account-cell-wrapper input,
.account-cell-wrapper .form-control {
    flex: 1;
    min-width: 0;
}

.account-nav-icon {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.75rem;
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px;
}

.account-nav-icon:hover {
    color: #0a58ca;
}

/* SF Case number column — monospace for easy reading of numeric IDs */
.sf-case-cell {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9375rem;
    color: #444;
    text-align: center;
}

.sf-link {
    color: #0d6efd;
    text-decoration: none;
    font-family: 'Consolas', 'Courier New', monospace;
}

.sf-link:hover {
    text-decoration: underline;
}

.sf-status-cell {
    font-size: 0.85rem;
    text-align: center;
    color: #555;
}

/* Alternating row stripes for non-highlighted rows */
.backlog-table tbody tr:nth-child(even):not(.row-waiting-on-client):not(.row-stuck):not(.row-needs-triage):not(.row-maintenance):not(.row-tiger-team):not(.link-group-header):not(.release-group-header) td {
    background-color: #f2f7fb;
}

.backlog-table tbody tr:nth-child(even):not(.row-waiting-on-client):not(.row-stuck):not(.row-needs-triage):not(.row-maintenance):not(.row-tiger-team):not(.link-group-header):not(.release-group-header) td.col-stackrank {
    background-color: #c0ddf0;
}

/* Title column — truncate with ellipsis, full title in tooltip */
.title-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

/* Tags column */
.tags-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8125rem;
    color: #6c757d;
}

/* Editable cell input — minimal chrome to look like table cell */
.editable-cell {
    padding: 0.1rem 0.25rem;
    border: 1px solid transparent;
    background: transparent;
    font-size: inherit;
    width: 100%;
    min-width: 50px;
}

.editable-cell:focus {
    border-color: #86b7fe;
    background: #fff;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* Dirty cell highlight — shows which fields have been changed.
   Uses a green tint so it's visible on both white rows and gold waiting-on-client rows. */
.dirty-cell {
    background-color: #d4edda !important;
}

/* Editable inputs inside highlighted rows should inherit row color */
.row-waiting-on-client .editable-cell,
.row-stuck .editable-cell,
.row-maintenance .editable-cell,
.row-tiger-team .editable-cell {
    color: inherit;
}

/* ---------------------------------------------------------------
   Driver Report — print-friendly tables for weekly screenshot export
   --------------------------------------------------------------- */

/* Capture container — white background so html2canvas gets a clean image.
   inline-block shrink-wraps to the table width, preventing extra whitespace
   from appearing in the exported PNG. */
.report-capture {
    display: inline-block;
    background-color: #ffffff;
    padding: 0.25rem;
}

/* Report tables — compact, borderless look optimized for PowerPoint screenshots */
.report-table {
    table-layout: fixed;
    font-size: 0.8rem;
    line-height: 1.3;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    border-top: 1px solid #d5dce4;
    border-left: 1px solid #d5dce4;
}

.report-table td,
.report-table th {
    padding: 0.25rem 0.4rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #d5dce4;
    border-bottom: 1px solid #d5dce4;
}

.report-table thead th {
    font-weight: 600;
    background-color: #1f4e79;
    color: #ffffff;
    border-color: #163d5e;
}

/* Stack Rank column highlight */
.report-table .col-stackrank {
    background-color: #d6eaf8;
    font-weight: 700;
    text-align: center;
}

.report-table thead th.col-stackrank {
    background-color: #2980b9;
}

/* ADO link in report tables */
.report-table .ado-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

/* Title truncation in report tables */
.report-table .title-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SF Case number in report tables */
.report-table .sf-case-cell {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #444;
    text-align: center;
}

.report-table .sf-link {
    color: #0d6efd;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
}

.report-table .sf-status-cell {
    font-size: 0.75rem;
    text-align: center;
    color: #555;
}

/* Row highlights in report tables — reuse same palette as backlog */
.report-table tr.row-waiting-on-client td {
    background-color: #f5b041 !important;
    color: #4a2800;
}

.report-table tr.row-waiting-on-client td.col-stackrank {
    background-color: #e59400 !important;
}

.report-table tr.row-waiting-on-client .ado-link {
    color: #6b3a00;
}

.report-table tr.row-stuck td {
    background-color: #f8d7da !important;
    color: #721c24;
}

.report-table tr.row-stuck td.col-stackrank {
    background-color: #f1aeb5 !important;
}

.report-table tr.row-needs-triage td {
    background-color: #e8dff5 !important;
    color: #4a2d7a;
}

.report-table tr.row-needs-triage td.col-stackrank {
    background-color: #d4bfed !important;
}

/* Maintenance rows in report — orange fill */
.report-table tr.row-maintenance td {
    background-color: #f5b041 !important;
    color: #4a2800;
}

.report-table tr.row-maintenance td.col-stackrank {
    background-color: #e59400 !important;
}

.report-table tr.row-maintenance .ado-link {
    color: #6b3a00;
}

/* Tiger Team rows in report — yellow fill */
.report-table tr.row-tiger-team td {
    background-color: #fce883 !important;
    color: #5a4b00;
}

.report-table tr.row-tiger-team td.col-stackrank {
    background-color: #f0d94e !important;
}

.report-table tr.row-tiger-team .ado-link {
    color: #5a4b00;
}

/* Release version group header in report tables */
.report-table tr.release-group-header td {
    background-color: #1f4e79;
    color: #fff;
    border-top: 2px solid #0d2f4f;
    border-bottom: 1px solid #3a7fc4;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Link group header rows in report tables — collapsed summary rows for linked tickets */
.report-table tr.link-group-header td {
    background-color: #d6e9f8;
    border-top: 2px solid #4a90c4;
    border-bottom: 1px solid #b0cfe0;
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Alternating row stripes in report tables */
.report-table tbody tr:nth-child(even):not(.row-waiting-on-client):not(.row-stuck):not(.row-needs-triage):not(.row-maintenance):not(.row-tiger-team):not(.release-group-header):not(.link-group-header) td {
    background-color: #f2f7fb;
}

.report-table tbody tr:nth-child(even):not(.row-waiting-on-client):not(.row-stuck):not(.row-needs-triage):not(.row-maintenance):not(.row-tiger-team):not(.release-group-header):not(.link-group-header) td.col-stackrank {
    background-color: #c0ddf0;
}

/* Hover — subtle for report tables */
.report-table tbody tr:hover td {
    filter: brightness(0.95);
}

/* ---------------------------------------------------------------------------
   Docked side panel (Teams-style)
   ---------------------------------------------------------------------------
   A panel pinned to the right edge of the scrolling content region, used for the
   feature Updates conversation. It deliberately does NOT use Bootstrap's
   .offcanvas: offcanvas is a modal overlay that dims and blocks the page behind
   it, whereas the whole point here is to keep reading and editing the feature
   while the conversation stays open beside it — exactly how Teams behaves.

   position: fixed rather than absolute, because the panel must stay put while
   .content scrolls underneath it. */
.side-panel {
    position: fixed;
    top: 3rem; /* clears the fixed .top-nav */
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background-color: #fff;
    border-left: 1px solid #d5dce4;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1030; /* above page content, below Bootstrap modals (1055) */
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #d5dce4;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

/* The only scrolling region inside the panel, so the header and composer stay
   pinned while the conversation scrolls. min-height:0 is required for a flex
   child to be allowed to shrink below its content and actually scroll. */
.side-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
}

.side-panel-footer {
    flex-shrink: 0;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid #d5dce4;
    background-color: #f8f9fa;
}

/* When the panel is docked open, the page content is squeezed rather than
   covered — content hidden behind a panel is the usual complaint with overlays. */
.side-panel-open {
    padding-right: 380px;
}

/* Below this width a 380px panel would leave too little room for the tables, so
   it overlays the content instead of displacing it. */
@media (max-width: 1200px) {
    .side-panel-open {
        padding-right: 0;
    }
}

/* ---------------------------------------------------------------------------
   Global print rules
   ---------------------------------------------------------------------------
   Companion to the @media print block in MainLayout.razor.css. That file unwinds
   the layout shell (.page / main / .content); this one releases the *inner*
   scrolling regions that individual pages create, so the full content prints
   rather than just the slice that happened to be on screen.

   Anything with a max-height plus overflow will otherwise be clipped by the print
   renderer and have its scrollbar rasterised into the output. */
@media print {
    /* Data grids: drop the height cap so every row flows onto the page. */
    .table-scroll-container {
        overflow: visible !important;
        max-height: none !important;
        border: none !important;
    }

    /* Sticky headers are meaningless on paper and can double-print; pin them back
       into the normal flow, but keep them repeating on each printed page. */
    .backlog-table thead th {
        position: static !important;
    }

    .backlog-table thead {
        display: table-header-group;
    }

    /* Avoid splitting a row across a page break. */
    .backlog-table tr,
    .report-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Screen-only affordances (buttons, toolbars, filter rows) opt out by class. */
    .no-print {
        display: none !important;
    }

    /* The docked panel is screen furniture: it is fixed-position and would
       otherwise be stamped onto every printed page. Its indent goes with it. */
    .side-panel {
        display: none !important;
    }

    .side-panel-open {
        padding-right: 0 !important;
    }

    /* Print backgrounds/colours as designed rather than having them stripped out. */
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}