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;
}
/* Shared extra-compact MudDataGrid density (devices grid, device events, audit log). Global (not
   scoped) so every grid that opts in via .eg-dense-grid matches, regardless of component. Beats
   MudBlazor's own .mud-table-dense rules on specificity. */
.eg-dense-grid .mud-table-dense .mud-table-row .mud-table-cell {
    padding-top: 3px;
    padding-bottom: 3px;
    padding-inline-start: 12px;
    padding-inline-end: 12px;
    /* Pin an explicit, uniform data-row height (border-box, so the 1px row-separator border is
       included). Every row is exactly this tall regardless of its content or highlight state -- the
       pending-restart icon, the row tint, and the left accent bar can't nudge it, so rows never vary
       by a pixel between highlighted and plain. Content (a ~18px text/icon line + 6px padding) fits
       inside with margin to spare; vertical-align keeps it centred. */
    height: 26px;
    box-sizing: border-box;
    vertical-align: middle;
}

.eg-dense-grid .mud-table-dense .mud-table-head .mud-table-cell {
    padding-top: 4px;
    padding-bottom: 4px;
    padding-inline-start: 12px;
    padding-inline-end: 12px;
    /* Pin the header height too (border-box), so the devices grid's one-page row reservation in
       Devices.razor.css -- calc(28px header + 10 * 26px rows) -- is exact and the table sits flush
       against the pager on a full page. */
    height: 28px;
    box-sizing: border-box;
}

.eg-dense-grid .mud-table-dense .mud-table-cell {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* The log grids (device events, audit) get a little more row height than the tight master grid
   (there's plenty of horizontal room now) so they read like the striped Device Info MudSimpleTables. */
.eg-log-grid .mud-table-dense .mud-table-row .mud-table-cell {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Devices with a pending restart: a faint warning tint (wins over the striping) plus a left accent
   bar on the first cell, so the row is noticeable without overwhelming the grid. An overdue deadline
   escalates the same treatment to the error colour. */
.eg-row-pending td {
    background-color: var(--mud-palette-warning-hover, rgba(255, 152, 0, 0.12)) !important;
}
.eg-row-pending td:first-child {
    box-shadow: inset 3px 0 0 0 var(--mud-palette-warning, #ff9800);
}
.eg-row-overdue td {
    background-color: var(--mud-palette-error-hover, rgba(244, 67, 54, 0.12)) !important;
}
.eg-row-overdue td:first-child {
    box-shadow: inset 3px 0 0 0 var(--mud-palette-error, #f44336);
}
/* Expired licence: a distinct violet so it doesn't read as a restart-urgency colour. Takes priority
   over the restart tints because an unlicensed device won't restart at all. */
.eg-row-expired td {
    background-color: rgba(126, 87, 194, 0.14) !important;
}
.eg-row-expired td:first-child {
    box-shadow: inset 3px 0 0 0 #7e57c2;
}

/* Audit log: a denied entry (an authorization refusal) gets the same error tint + accent as an overdue
   device, so failed-access attempts stand out against the striped log. */
.eg-row-denied td {
    background-color: var(--mud-palette-error-hover, rgba(244, 67, 54, 0.12)) !important;
}
.eg-row-denied td:first-child {
    box-shadow: inset 3px 0 0 0 var(--mud-palette-error, #f44336);
}

/* Colour key under the devices grid (row tints have no column to explain them). */
.eg-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--mud-typography-caption-size, 0.75rem);
    color: var(--mud-palette-text-secondary);
}
.eg-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: 0 0 auto;
}
.eg-legend-pending { background: var(--mud-palette-warning-hover, rgba(255, 152, 0, 0.12)); box-shadow: inset 3px 0 0 0 var(--mud-palette-warning, #ff9800); }
.eg-legend-overdue { background: var(--mud-palette-error-hover, rgba(244, 67, 54, 0.12)); box-shadow: inset 3px 0 0 0 var(--mud-palette-error, #f44336); }
.eg-legend-expired { background: rgba(126, 87, 194, 0.14); box-shadow: inset 3px 0 0 0 #7e57c2; }

/* Slightly smaller device tag pills. */
.mud-chip.eg-tag {
    height: 18px;
    padding-left: 8px;
    padding-right: 8px;
}

.eg-tag .mud-chip-label {
    font-size: 0.64rem;
}

.eg-tag .mud-chip-icon {
    font-size: 0.82rem;
}

/* Match the master-grid heading (Typo.h6) on the detail panel's tab labels. */
/* Match the tab labels to the section headers (Typo.subtitle2) so all headings on the panel align. */
.eg-detail-tabs .mud-tab {
    font-size: var(--mud-typography-subtitle2-size, 0.875rem);
    font-weight: var(--mud-typography-subtitle2-weight, 500);
    line-height: var(--mud-typography-subtitle2-lineheight, 1.57);
    letter-spacing: var(--mud-typography-subtitle2-letterspacing, 0.00714em);
    text-transform: none;
}


/* Match the Device Info key/value table font to the grids (0.8125rem). */
.eg-info-table .mud-simple-table td,
.eg-info-table .mud-simple-table td .mud-typography {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Breathing room above the detail tab content (below the tab bar), consistent across tabs. */
.eg-detail-tabs .mud-tabs-panels {
    padding-top: 16px;
}

/* Device Info sections packed into balanced columns (masonry) so they tile tidily without gaps. */
.eg-info-sections {
    column-width: 280px;
    column-count: 3;
    column-gap: 24px;
}

.eg-info-section {
    break-inside: avoid;
    margin-bottom: 14px;
}

.eg-info-section .mud-simple-table {
    width: 100%;
}
