html, body {
    font-family: 'Helvetica Neue', Helvetica, 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;
}

.content {
    padding-top: 1.1rem;
}

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;
}
/* Rendered knowledge-base article body (Markdown -> HTML). */
.kb-body {
    line-height: 1.6;
}

.kb-body h1, .kb-body h2, .kb-body h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.kb-body img {
    max-width: 100%;
    height: auto;
}

.kb-body pre {
    background: #f6f8fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

.kb-body code {
    background: #f6f8fa;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.kb-body pre code {
    background: none;
    padding: 0;
}

.kb-body table {
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.kb-body table th, .kb-body table td {
    border: 1px solid #d0d7de;
    padding: 0.35rem 0.6rem;
}

.kb-body blockquote {
    border-left: 3px solid #d0d7de;
    padding-left: 1rem;
    color: var(--bs-secondary-color);
}

/* Customer support portal — branded sign-in / auth card (support.* host) */
.cust-auth {
    max-width: 440px;
    margin: 2.5rem auto;
}

.cust-auth-card {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.cust-auth-head {
    background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%);
    color: #fff;
    padding: 1.75rem 1.75rem 1.5rem;
}

.cust-auth-brand {
    font-size: 1.35rem;
    font-weight: 700;
}

.cust-auth-brand span {
    opacity: 0.8;
    font-weight: 500;
}

.cust-auth-tag {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.cust-auth-body {
    padding: 1.5rem 1.75rem 0.5rem;
}

.cust-auth-btn {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    font-weight: 600;
}

.cust-auth-btn:hover, .cust-auth-btn:focus {
    background: #115e59;
    border-color: #115e59;
    color: #fff;
}

.cust-auth-or {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    margin: 1rem 0;
}

.cust-auth-or::before, .cust-auth-or::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e5e9ef;
}

.cust-auth-or span {
    padding: 0 0.75rem;
}

.cust-auth-foot {
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid #eef1f5;
    text-align: center;
    font-size: 0.9rem;
}

.cust-auth-foot a {
    color: #0f766e;
    font-weight: 600;
    text-decoration: none;
}

.cust-auth-foot a:hover {
    text-decoration: underline;
}

/* Developer (staff) portal — blue identity for sign-in and dashboard */
.dev-auth {
    max-width: 440px;
    margin: 3rem auto;
}

.dev-auth-card {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dev-auth-head {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #fff;
    padding: 1.75rem 1.75rem 1.5rem;
}

.dev-auth-brand {
    font-size: 1.35rem;
    font-weight: 700;
}

.dev-auth-brand span {
    opacity: 0.8;
    font-weight: 500;
}

.dev-auth-tag {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.dev-auth-body {
    padding: 1.5rem 1.75rem 0.5rem;
}

.dev-auth-btn {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 600;
}

.dev-auth-btn:hover, .dev-auth-btn:focus {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
}

.dev-auth-or {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    margin: 1rem 0;
}

.dev-auth-or::before, .dev-auth-or::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e5e9ef;
}

.dev-auth-or span {
    padding: 0 0.75rem;
}

.dev-auth-foot {
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid #eef1f5;
    text-align: center;
    font-size: 0.9rem;
}

.dev-auth-foot a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.dev-auth-foot a:hover {
    text-decoration: underline;
}

/* Dashboard welcome hero */
.dev-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dev-hero-title {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.dev-hero-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.dev-hero-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dev-hero-actions .btn {
    font-weight: 600;
}

/* Shared sign-in / auth shell — top bar + centered card, no sidebar (both hosts) */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fa;
}

.auth-topbar {
    color: #fff;
    padding: 0.9rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.auth-topbar .brand-sub {
    opacity: 0.8;
    font-weight: 500;
}

.auth-topbar-cust {
    background: linear-gradient(90deg, #0f766e 0%, #115e59 100%);
}

.auth-topbar-dev {
    background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 100%);
}

.auth-main {
    flex: 1;
}

/* Long-text fields that grow with what's typed — see js/autogrow.js, which sets the height.
   These rules set the floor (never smaller than a few comfortable lines) and the ceiling (a tall
   field scrolls internally instead of pushing the Save button off the screen). */
textarea.autogrow {
    min-height: 6rem;
    max-height: 65vh;
    overflow-y: auto;
    resize: vertical;
    line-height: 1.5;
}

textarea.autogrow-sm {
    min-height: 4.5rem;
}

/* Roughly the eight rows the staff reply box used to open at — a reply starts as a paragraph,
   not a line, so it shouldn't have to grow into one. */
textarea.autogrow-md {
    min-height: 12.5rem;
}

textarea.autogrow-lg {
    min-height: 14rem;
}

/* Long-text boxes with live bullet and numbered lists — see Components/Shared/ListTextEditor.razor
   and js/list-editor.js. Same floor and ceiling as the growing textareas above; the box grows by
   itself because it's a div. */
.list-editor {
    position: relative;
    min-height: 6rem;
    max-height: 65vh;
    overflow-y: auto;
    resize: vertical;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    cursor: text;
}

.list-editor-sm {
    min-height: 4.5rem;
}

.list-editor-md {
    min-height: 12.5rem;
}

.list-editor-lg {
    min-height: 14rem;
}

.list-editor[data-empty]::before {
    content: attr(data-placeholder);
    position: absolute;
    top: 0.375rem;
    left: 0.75rem;
    right: 0.75rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

/* Lines of plain text, shared by the editor and by FormattedText. A list item is indented by its
   level plus one step, and its marker sits in that last step, so a wrapped line lines up under the
   item's text rather than under the marker or the box edge. */
.lt-line {
    position: relative;
    min-height: 1.5em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.lt-line[data-kind="bullet"],
.lt-line[data-kind="number"] {
    padding-left: calc((var(--lvl, 0) + 1) * 1.6em);
}

.lt-line[data-kind="bullet"]::before,
.lt-line[data-kind="number"]::before {
    position: absolute;
    left: calc(var(--lvl, 0) * 1.6em);
    width: 1.6em;
    padding-right: 0.35em;
    text-align: right;
}

.lt-line[data-kind="bullet"]::before {
    content: "•";
}

.lt-line[data-kind="bullet"][data-level="1"]::before,
.lt-line[data-kind="bullet"][data-level="4"]::before {
    content: "◦";
}

.lt-line[data-kind="bullet"][data-level="2"]::before,
.lt-line[data-kind="bullet"][data-level="5"]::before {
    content: "▪";
}

.lt-line[data-kind="number"]::before {
    content: attr(data-n) ".";
}

/* List-page filter rows. Six filters plus a search box that deserves more room than a dropdown
   don't divide into Bootstrap's twelve columns, so this is a flex row with a minimum width per
   control instead: everything sits on one line at desktop widths and wraps by itself when the
   viewport can't hold it, rather than at a breakpoint guessed in advance. */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-bar > * {
    flex: 1 1 9rem;
    min-width: 9rem;
}

/* The search box takes roughly twice a dropdown's share of the row. */
.filter-bar .filter-search {
    flex: 2 1 16rem;
    min-width: 12rem;
}

/* A dropdown whose selected value is longer than the rest — "Open (not closed)" — gets enough of
   the row to show it, since only the chosen option has to fit while the menu is closed. */
.filter-bar .filter-wide {
    flex: 1.4 1 11rem;
    min-width: 11rem;
}

/* Checkboxes take only the room their own label needs, not an equal share of the row. */
.filter-bar .filter-check {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

/* Reply box while a file is being dragged over it (js/support-attach.js). */
.drop-target {
    outline: 2px dashed var(--bs-primary);
    outline-offset: -2px;
}
