.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #261638;
    border-bottom: 3px solid #5f368d;
    color: white;
}

.app-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.app-version {
    font-size: 0.75rem;
    opacity: 0.6;
}

.app-user {
    margin-left: auto;
}

.app-body {
    display: flex;
    flex: 1;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    width: 220px;
    padding: 1rem 0;
    background: #f5f5f7;
    border-right: 1px solid #e0e0e0;
}

    .nav-menu .nav-link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.6rem 1.25rem;
        color: #261638;
        text-decoration: none;
        border-left: 3px solid transparent;
    }

        .nav-menu .nav-link.active {
            background: #dfd7e8;
            border-left-color: #5f368d;
            font-weight: 600;
        }

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.app-content {
    flex: 1;
    /* Flex items default to min-width: auto, which refuses to shrink below the intrinsic width of
       their content - a wide grid (or any wide content) then balloons .app-content past its allotted
       space instead of scrolling internally, and since nothing upstream clips it, the whole page grows
       a horizontal scrollbar. min-width: 0 lets it actually shrink to the space .app-body gives it. */
    min-width: 0;
    padding: 1.5rem;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

.login-form-layout {
    width: 100%;
}

.login-submit {
    margin-top: 0.5rem;
}

.login-error {
    color: #b32121;
}

.syntaxes-sync-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.license-key-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

    .license-key-field .dxbl-text-box {
        flex: 1;
    }

.password-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

    .password-field .dxbl-text-box {
        flex: 1;
    }

.grid-error {
    color: #b32121;
}

.form-hint {
    background: #fff6e0;
    border-left: 3px solid #e0a800;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #5c4a08;
}

.grid-scroll-wrapper {
    overflow-x: auto;
}

/* Constrain the ticket grids so tall/wide ones get their own internal scrollbars instead of growing
   the page. Selector must out-specificity DevExpress's own .dxbl-grid rule (which sets
   max-height: 10000px via --dxbl-grid-max-height), otherwise the library's rule wins on cascade order
   and the grid never actually caps its height, so no scrollbar ever appears - see the same pattern in
   PapasCloud's .dxbl-grid.secretarial-scroll-grid. Per DevExpress's own docs
   (https://docs.devexpress.com/Blazor/404753), the horizontal scrollbar appears automatically once the
   grid's own rendered width is constrained and column widths exceed it - max-width plus overflow-x here
   (rather than relying on the .grid-scroll-wrapper ancestor) puts that constraint directly on the grid. */
.dxbl-grid.ticket-scroll-grid {
    max-height: 65vh;
    max-width: 100%;
    overflow-x: auto;
}

.ticket-tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    white-space: nowrap;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

/* DevExpress's checkbox renders shorter than the buttons it sits next to in these toolbars, so
   even with align-items:center it reads as sitting a bit high - nudge it down slightly. */
.toolbar-checkbox {
    margin-top: 0.65rem;
}

.ticket-quick-filter-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #dfd7e8;
    color: #5f368d;
    border-radius: 1rem;
    padding: 0.2rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.grid-size-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

    .grid-size-picker label {
        margin: 0;
    }

.ticket-progress-panel {
    padding: 0.75rem 1rem;
}

.ticket-progress-add {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

    .ticket-progress-add .dxbl-memo {
        width: 100%;
    }

.ticket-mention-wrapper {
    position: relative;
    width: 100%;
}

.ticket-mention-suggestions {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid #bfafd1;
    border-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-height: 12rem;
    overflow-y: auto;
}

    .ticket-mention-suggestions li {
        padding: 0.4rem 0.75rem;
        cursor: pointer;
    }

        .ticket-mention-suggestions li:hover {
            background: #dfd7e8;
        }

.ticket-detail-content {
    max-width: 500px;
}

.ticket-edit-popup {
    width: 650px;
    max-width: 95vw;
}

.ticket-progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .ticket-progress-list li {
        padding: 0.4rem 0;
        border-bottom: 1px solid #e0e0e0;
    }

.ticket-progress-meta {
    display: block;
    font-size: 0.75rem;
    color: #6b6b6b;
}

.ticket-progress-note {
    display: block;
    white-space: pre-wrap;
}

.ticket-sub-tickets ul {
    margin: 0.2rem 0 0.6rem 0;
    padding-left: 1.2rem;
}

.ticket-ai-log {
    max-width: 900px;
    margin-top: 0.75rem;
}

    .ticket-ai-log details {
        border-bottom: 1px solid #e0e0e0;
        padding: 0.3rem 0;
    }

    .ticket-ai-log summary {
        cursor: pointer;
        font-size: 0.85rem;
    }

.ticket-progress-meta-inline {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #6b6b6b;
}

.ticket-ai-summary {
    white-space: pre-wrap;
    font-size: 0.85rem;
    padding: 0.4rem 0 0.2rem 0;
}

.sql-scripter-input {
    width: 100%;
    max-width: 60rem;
    margin-bottom: 0.75rem;
}

.sql-scripter-results {
    overflow-x: auto;
    margin-top: 1rem;
}

    .sql-scripter-results table {
        border-collapse: collapse;
    }

    .sql-scripter-results th,
    .sql-scripter-results td {
        border: 1px solid #ddd;
        padding: 0.35rem 0.6rem;
        text-align: left;
        white-space: nowrap;
    }

.client-detail-panel {
    padding: 1rem 0.5rem;
}

.client-detail-fields {
    margin-bottom: 1.25rem;
}

.client-detail-table {
    border-collapse: collapse;
}

    .client-detail-table th,
    .client-detail-table td {
        border: 1px solid #ddd;
        padding: 0.3rem 0.6rem;
        text-align: left;
    }

    .client-detail-table th {
        font-weight: 600;
        white-space: nowrap;
    }

.client-statement-button {
    margin-bottom: 0.75rem;
}

.ticket-report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.ticket-report-hide-completed {
    /* Sibling filter fields are a <label> stacked above an input; this checkbox has no label,
       so with the row's align-items:flex-end it used to float near the top instead of lining up
       with the input boxes below the labels. Push it down by roughly a label's height instead. */
    padding-top: 1.8rem;
}

    .ticket-report-filters label {
        display: block;
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

.ticket-summary-layout {
    padding: 0.5rem 0 1rem 0;
}

.ticket-summary-refresh {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ticket-summary-tiles {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.ticket-summary-chart {
    margin-bottom: 1.5rem;
}

    .ticket-summary-chart h4 {
        margin: 0 0 0.5rem 0;
    }

.ticket-summary-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 1rem 1.5rem;
    background: #f5f5f7;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    cursor: pointer;
}

    .ticket-summary-tile:hover {
        border-color: #261638;
    }

.ticket-summary-tile-value {
    font-size: 2rem;
    font-weight: 700;
    color: #261638;
}

.ticket-summary-tile-label {
    font-size: 0.85rem;
    color: #6b6b6b;
}

.ticket-summary-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 46rem;
}

    .ticket-summary-table th,
    .ticket-summary-table td {
        border: 1px solid #e0e0e0;
        padding: 0.5rem 0.75rem;
        text-align: left;
    }

    .ticket-summary-table th {
        background: #f5f5f7;
        font-weight: 600;
    }

    .ticket-summary-table tbody tr {
        cursor: pointer;
    }

        .ticket-summary-table tbody tr:hover {
            background: #f0f4ff;
        }

    .ticket-summary-table tfoot td {
        border-top: 2px solid #261638;
        font-weight: 700;
    }

.ticket-summary-table-wide {
    max-width: none;
}

.mentions-show-all {
    margin-bottom: 0.75rem;
}

/* Progress popup: "Ready for testing" tick with the optional tester picker beside it */
.ticket-ready-for-testing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

    .ticket-ready-for-testing .dxbl-combobox {
        flex: 1 1 200px;
    }

/* To Be Tested tab: Passed / Failed buttons side by side */
.ticket-test-actions {
    white-space: nowrap;
}

    .ticket-test-actions .dxbl-btn + .dxbl-btn {
        margin-left: 0.4rem;
    }

.ticket-summary-tile.overdue {
    background: #fdecec;
    border-color: #e8b4b4;
}

    .ticket-summary-tile.overdue .ticket-summary-tile-value {
        color: #b32121;
    }

.ticket-subnav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.ticket-subnav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    color: #261638;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

    .ticket-subnav-link.active {
        font-weight: 600;
        border-bottom-color: #261638;
    }

.ticket-file-group {
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.ticket-file-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.ticket-file-group-title {
    font-weight: 600;
}

.ticket-file-group-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: #6b6b6b;
}

.ticket-type-badge {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

    .ticket-type-badge.bug {
        background: #fdecec;
        color: #b32121;
    }

    .ticket-type-badge.feature {
        background: #dfd7e8;
        color: #5f368d;
    }

.file-attachments {
    margin: 0.5rem 0 1rem 0;
}

.file-attachments-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.file-attachments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .file-attachments-list li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.3rem 0;
        border-bottom: 1px solid #eee;
        flex-wrap: wrap;
    }

.file-attachments-meta {
    font-size: 0.75rem;
    color: #6b6b6b;
}

.pending-files-list {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

    .pending-files-list li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.2rem 0;
    }

.file-attachments-empty {
    font-size: 0.85rem;
    color: #6b6b6b;
}

.file-attachments-delete {
    background: none;
    border: none;
    color: #b32121;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    margin-left: auto;
}

.ticket-overdue-row {
    background-color: #fdecec !important;
}

.ticket-due-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
