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;
}

/* Global search box sits on the dark teal AppBar — force white text + icon so
   the typed query and placeholder are readable against the dark background. */
.global-search-wrapper input {
    color: #fff !important;
}

.global-search-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.75) !important;
    opacity: 1;
}

.global-search-wrapper .mud-input-adornment .mud-icon-root,
.global-search-wrapper .mud-input-adornment-icon {
    color: rgba(255, 255, 255, 0.85) !important;
}

.global-search-wrapper .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ── Mobile (phone) data tables: horizontal scroll, NOT stacked cards ─────────
   Every MudTable in the app is configured (Breakpoint.None + HorizontalScrollbar)
   to stay a real table and scroll sideways on small screens. We deliberately do
   NOT collapse rows into stacked cards: the old card layout (display:block per
   row) squeezed each value into a narrow column and character-wrapped long text
   (e.g. an account name rendered "A / c O / m i l e ..."), which reads as broken
   stacking on a phone. Instead, keep columns at their natural width and let the
   MudBlazor scroll container handle the overflow. Applies to every table < 600px.
   IMPORTANT: if you ever want a true card layout on mobile, do it per-table via
   MudBlazor's own Breakpoint (remove Breakpoint.None) + DataLabel — don't
   re-introduce a global display:block override here, it fights the table config. */
@media (max-width: 599.98px) {
    .mud-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Natural width + nowrap so columns aren't compressed/character-wrapped to
       fit; the container scrolls instead. */
    .mud-table-container > table {
        width: max-content;
        min-width: 100%;
    }

    .mud-table-container > table > thead > tr > th.mud-table-cell,
    .mud-table-container > table > tbody > tr > td.mud-table-cell {
        white-space: nowrap;
    }
}

/* Timesheet entry "extras" groups (Allowances / Custom fields).
   A subtle divider + header above a neatly wrapped row of inputs/checkboxes. */
.ts-extras-group {
    border-top: 1px solid var(--mud-palette-divider);
    padding-top: 8px;
    margin-top: 4px;
}

.ts-extras-label {
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 6px;
}

.ts-extras-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 28px; /* tight rows, comfortable columns */
}

/* ── Tab bars: labels + count badges must always fit ─────────────────────────
   MudTabPanel's BadgeData pill is absolutely positioned OUTSIDE the layout
   flow, so the tab never reserves width for it: the pill collides with the
   next tab's edge and gets clipped at the scroll-viewport boundary (seen on
   Account Details, where ASSIGNMENTS' count was cut in half). Re-style the
   pill as an in-flow chip after the label so the tab is measured WITH it.
   Applies to every MudTabs in the app (Account Details, Invoicing, Payables,
   Reports, Feedback). */
.mud-tab .mud-tab-badge .mud-badge-wrapper {
    position: static;
}

.mud-tab .mud-tab-badge .mud-badge {
    position: static;
    transform: none;
    margin-left: 8px;
}

/* Each tab also carries an inline min-width:160px (Material default), which
   makes 7 tabs ~1.1k px wide and forces scroll-arrow overflow even on a
   1366px laptop. Let tabs size to their content instead (inline style needs
   the !important), and trim the default horizontal padding so a 7-tab bar
   (Account Details) fits a laptop without scroll arrows. */
.mud-tabs .mud-tab {
    min-width: 0 !important;
    padding-left: 14px;
    padding-right: 14px;
}

/* Non-production environment marker (see Components/Shared/EnvironmentBanner.razor).
   Fixed to the top and above MudBlazor's app bar (z-index 1100) so it cannot be scrolled away or
   covered — a banner you can lose track of defeats the point. Body padding keeps it from sitting
   on top of the app bar. Absent config renders nothing, so production is unaffected. */
.cscrm-env-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    height: 24px;
    line-height: 24px;
    text-align: center;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body:has(.cscrm-env-banner) .mud-appbar { top: 24px; }
body:has(.cscrm-env-banner) .mud-drawer { padding-top: 24px; }
