html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #4A4540;
}

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;
    background-color: #4A4540;
}

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;
}

/* SyncFusion DocumentEditor Cursor Visibility Fix */
/* Ensure text cursor is always visible in SyncFusion DocumentEditor */
.e-de-container .e-de-content,
.e-de-container .e-de-content .e-de-page-container,
.e-de-container .e-de-content .e-de-page,
.e-de-container .e-de-content .e-de-page .e-de-page-content,
.e-de-container .e-de-content .e-de-page .e-de-page-content *,
.e-de-container .e-de-content .e-de-page .e-de-page-content p,
.e-de-container .e-de-content .e-de-page .e-de-page-content span,
.e-de-container .e-de-content .e-de-page .e-de-page-content div {
    cursor: text !important;
    caret-color: #000 !important;
}

/* Ensure SyncFusion DocumentEditor allows text selection and shows cursor */
.e-de-container,
.e-de-container .e-de-content {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Fix for any potential cursor hiding in SyncFusion components */
.e-de-container .e-de-content .e-de-page .e-de-page-content {
    outline: none !important;
}

/* Ensure the blinking text cursor is visible */
.e-de-container .e-de-content .e-de-page .e-de-page-content:focus {
    caret-color: #000 !important;
    cursor: text !important;
}


/* ============================================
   PHONE WIDTHS (<= 640px) - shared page chrome
   Scoped under article.content so the rules outrank the unscoped <style> blocks
   many pages carry, and so they never reach the login pages. Layout only.
   ============================================ */
@media (max-width: 640.98px) {
    /* Title + action buttons: stack, and let the buttons wrap instead of pushing
       the page wider than the screen */
    article.content .page-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.5rem;
    }

    article.content .page-header h1,
    article.content .page-header h2 {
        font-size: 1.5rem;
    }

    article.content .page-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Tab strips scroll sideways rather than wrapping into a stack of half-tabs */
    article.content .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    article.content .nav-tabs .nav-link {
        white-space: nowrap;
    }

    /* Button rows in card headers and toolbars */
    article.content .card-header.d-flex,
    article.content .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    article.content .card-body {
        padding: 0.75rem;
    }

    /* Long unbroken strings (emails, invoice numbers, URLs) must not widen the page.
       break-word, not anywhere: anywhere also shrinks a column's minimum width and
       splits short labels like "Retainage:" mid-word. */
    article.content dd,
    article.content td,
    article.content .card-body p {
        overflow-wrap: break-word;
    }

    /* Data tables already sit in .table-responsive: give every column a readable
       minimum and let the wrapper scroll sideways, instead of crushing seven columns
       into 360px so a description wraps one word per line */
    article.content .table-responsive > .table td,
    article.content .table-responsive > .table th {
        overflow-wrap: normal;
        min-width: 6.5rem;
    }

    article.content .table-responsive > .table th {
        white-space: nowrap;
    }
}
