body { margin: 0; font-family: system-ui, sans-serif; background: #f3f5f7; color: #182535; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 2rem; background: #152a43; }
.portal-header a { display: flex; align-items: center; gap: .75rem; color: white; text-decoration: none; font-weight: 700; }
.portal-user { display: flex; align-items: center; gap: .75rem; color: white; }
.portal-username { font-weight: 600; }
.portal-header .portal-signout-form { padding: 0; margin: 0; border: 0; background: transparent; }
.portal-header .portal-signout { display: flex; padding: .25rem; margin: 0; border-radius: .25rem; background: transparent; color: white; }
.portal-header .portal-signout:hover, .portal-header .portal-signout:focus-visible { background: rgba(255, 255, 255, .2); }
.portal-layout { display: flex; align-items: flex-start; min-height: calc(100vh - 74px); }
.portal-sidebar { flex: 0 0 15rem; margin: 1.5rem 0 1.5rem 1.5rem; overflow: hidden; background: white; border: 1px solid #ccd5df; border-radius: .5rem; }
.portal-menu summary { padding: 1rem 1.25rem; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.portal-menu summary:focus-visible { outline: 2px solid #175688; outline-offset: -2px; }
.portal-nav { display: flex; flex-direction: column; gap: .15rem; padding: .25rem .75rem 1rem; background: white; }
.portal-nav a { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: .25rem; color: #175688; text-decoration: none; }
.portal-nav a.active { background: #e8f0f7; font-weight: 700; text-decoration-thickness: 3px; }
.portal-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { margin: 2rem auto 1rem; padding: 0 1.25rem; }
.portal-main { flex: 1; min-width: 0; box-sizing: border-box; }
form, .panel { background: white; border: 1px solid #ccd5df; border-radius: .5rem; padding: 1.5rem; margin: 1rem 0; }
label { display: block; margin-top: .8rem; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { box-sizing: border-box; width: 100%; max-width: 650px; padding: .6rem; border: 1px solid #738397; border-radius: .25rem; margin: .25rem 0 .5rem; }
textarea { min-height: 100px; }
button, .button { display: inline-block; background: #175688; color: white; padding: .6rem 1rem; border: 0; border-radius: .25rem; margin: 1rem .5rem 0 0; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a.cancel-link { background: #e6ebf0; color: #175688; text-decoration: none; border: 1px solid #b9c6d2; padding: calc(.6rem - 1px) 1rem; }
a.cancel-link:hover, a.cancel-link:focus-visible { background: #d5dee7; }
table { width: 100%; border-collapse: collapse; background: white; margin: 1rem 0; }
th, td { padding: .7rem; text-align: left; border-bottom: 1px solid #ccd5df; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
.stock-table-scroll { max-width: 100%; max-height: calc(100vh - 25rem); min-height: 12rem; overflow: auto; margin: 1rem 0 0; }
.stock-table-scroll:focus-visible { outline: 2px solid #175688; outline-offset: 2px; }
.stock-table-scroll table { width: max-content; min-width: 100%; table-layout: auto; margin: 0; }
.stock-table-scroll th, .stock-table-scroll td { white-space: pre; overflow-wrap: normal; }
.stock-table-scroll th { position: sticky; top: 0; z-index: 1; background: white; }
.stock-table-scroll tbody tr:hover, .stock-table-scroll tbody tr:focus-within { background: #e8f0f7; }
.copy-button { display: inline-flex; vertical-align: middle; padding: .2rem; margin: 0 0 0 .4rem; background: transparent; color: #175688; border: 1px solid transparent; border-radius: .25rem; }
.stock-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .25rem 1rem; padding: .5rem 1rem; margin: .75rem 0 0; }
.stock-filter label { margin-top: 0; }
.stock-filter select { width: auto; min-width: 12rem; margin: .1rem 0 0; padding: .4rem; }
.stock-filter button, .stock-filter .button { margin: 0; padding: .45rem .9rem; }
.stock-table-scroll th a { color: inherit; text-decoration: none; }
.stock-table-scroll th a:hover, .stock-table-scroll th a:focus-visible { text-decoration: underline; }
.stock-table-scroll th[aria-sort] { background: #e8f0f7; }
.stock-table-scroll .archived-row td { color: #5b6b7d; font-style: italic; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.checkbox-label input { width: auto; margin: 0; }
.inline-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1.5rem; }
.inline-fields > .checkbox-label { margin-top: 0; padding-bottom: .9rem; }
.custom-field-row { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); align-items: center; gap: .25rem 1rem; max-width: 650px; }
.custom-field-row label, .custom-field-row input { margin-top: 0; margin-bottom: .5rem; }
@media (max-width: 600px) { .custom-field-row { grid-template-columns: 1fr; } }
.range-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.range-nav .button { margin: 0; }
.range-nav .button[aria-current="true"] { background: #0d3a5e; outline: 2px solid #0d3a5e; outline-offset: 2px; }
.calendar-filter fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: #cbd5e1; border: 1px solid #cbd5e1; }
.cal-head { background: #e2e8f0; padding: .35rem .5rem; font-weight: 700; text-align: center; }
.cal-day { background: #fff; min-height: 6.5rem; padding: .25rem .4rem; min-width: 0; }
.cal-week .cal-day { min-height: 12rem; }
.cal-day h3 { margin: 0 0 .25rem; font-size: .9rem; }
.cal-day h3 a { text-decoration: none; }
.cal-day ul { list-style: none; margin: 0; padding: 0; }
.cal-day li { margin-bottom: .3rem; }
.cal-outside { background: #f1f5f9; color: #64748b; }
.cal-today { outline: 2px solid #175688; outline-offset: -2px; }
.cal-dayname { display: none; }
.cal-week .cal-daynum { display: none; }
.cal-week .cal-dayname { display: inline; }
.cal-event { display: block; padding: .1rem .35rem; border-radius: 3px; border-left: 4px solid; font-size: .85rem; line-height: 1.25; text-decoration: none; color: #0f172a; overflow-wrap: anywhere; }
.cal-event:hover, .cal-event:focus { text-decoration: underline; }
.cal-time { font-weight: 700; margin-right: .25rem; }
.cal-where { display: block; font-size: .72rem; color: #475569; padding-left: .4rem; }
.cal-kind-everyone { background: #dbeafe; border-color: #1d4ed8; }
.cal-kind-franchise { background: #ede9fe; border-color: #6d28d9; }
.cal-kind-branch { background: #dcfce7; border-color: #15803d; }
.cal-kind-user { background: #ffedd5; border-color: #c2410c; }
.cal-cat-outofoffice { font-style: italic; }
.cal-key { font-size: .85rem; color: #475569; }
.cal-notes { white-space: pre-wrap; }
@media (max-width: 700px) {
    .cal-grid { display: block; }
    .cal-head, .cal-empty, .cal-outside { display: none; }
    .cal-day { min-height: 0; margin-bottom: 1px; }
    .cal-daynum { display: none; }
    .cal-dayname { display: inline; }
}
.chart { background: white; border: 1px solid #ccd5df; border-radius: .5rem; padding: 1rem 1.25rem; margin: 1rem 0; max-width: 60rem; }
.chart figcaption { margin-bottom: .5rem; }
.chart .chart-unit { color: #4a5a6c; font-size: .9rem; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .chart-grid { stroke: #ccd5df; stroke-width: 1; }
.chart .chart-label { fill: #4a5a6c; font-size: 11px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; margin: .5rem 0 0; padding: 0; font-size: .9rem; }
.chart-swatch { display: inline-block; width: .8rem; height: .8rem; margin-right: .4rem; border-radius: 2px; vertical-align: -1px; }
label.is-disabled, select:disabled { opacity: .55; }
button.row-delete, button.row-action { appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: 0; padding: 0; margin: 0; min-width: 0; min-height: 0; width: auto; height: auto; line-height: 1; }
button.row-delete { display: inline-flex; vertical-align: middle; color: #8a1f1f; }
button.row-delete:hover, button.row-delete:focus, button.row-delete:focus-visible, button.row-delete:active { background: transparent; border: 0; box-shadow: none; outline: 0; color: #c62828; }
.inline-form { display: inline; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
button.row-action { display: inline-flex; vertical-align: middle; color: #175688; cursor: pointer; }
a.row-action { display: inline-flex; vertical-align: middle; color: #175688; margin-right: .6rem; line-height: 1; }
a.row-action:hover, a.row-action:focus-visible { color: #0d3a5e; outline: 0; }
button.row-action:hover, button.row-action:focus, button.row-action:focus-visible, button.row-action:active { background: transparent; border: 0; box-shadow: none; outline: 0; color: #0d3a5e; }
.impersonation-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 1rem; background: #fff3cd; color: #4d3b00; border-bottom: 2px solid #c79100; }
.impersonation-banner form { margin: 0; padding: 0; border: 0; background: transparent; }
.copy-button:hover, .copy-button:focus-visible { background: white; border-color: #175688; }
.copy-button.copied { background: #edf8ef; color: #164b2c; border-color: #164b2c; }
.copy-field { display: flex; align-items: center; max-width: 650px; }
.fill-emails, .generate-password { flex: 0 0 auto; margin: 0 0 0 .4rem; white-space: nowrap; }
.username-field { flex-wrap: wrap; row-gap: .4rem; }
.username-field > input { flex-basis: 12rem; }
.copy-field > input:not([type=checkbox]):not([type=hidden]), .copy-field > select { flex: 1 1 0; width: auto; min-width: 0; max-width: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[role=alert] { color: #8a1010; padding: 1rem; background: #fff0f0; border: 1px solid #d49d9d; }
.notice { color: #164b2c; padding: 1rem; background: #edf8ef; }
.login-logo { display: block; width: min(280px, 80%); height: auto; margin: 1rem auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.dashboard-card { min-width: 0; padding: 1.25rem; background: white; border: 1px solid #ccd5df; border-radius: .5rem; }
.dashboard-card h2 { margin: 0; font-size: 1.15rem; }
.dashboard-card-heading { display: flex; align-items: center; gap: .75rem; }
.dashboard-icon { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; fill: none; stroke: #175688; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-metric { margin: .75rem 0 0; font-size: 2.5rem; font-weight: 700; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .portal-layout { flex-direction: column; }
    .portal-sidebar, .portal-sidebar.is-collapsed { flex-basis: auto; width: auto; margin: 1rem 1rem 0; align-self: stretch; }
    .portal-main { box-sizing: border-box; width: 100%; margin: 1.5rem auto; }
}
#blazor-error-ui { display: none; }
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;
}
.multi-select { max-width: 650px; margin: 0.5rem 0; border: 1px solid #888; border-radius: 4px; background: #fff; }
.multi-select summary { padding: 0.5rem 0.75rem; cursor: pointer; }
.multi-select-options { display: flex; flex-direction: column; gap: 0.25rem; max-height: 14rem; overflow-y: auto; padding: 0.5rem 0.75rem; border-top: 1px solid #ccc; }
.multi-select-options label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: normal; }
.multi-select-options input { width: auto; margin: 0; }
.multi-select-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.change-manager { border: 0; background: transparent; }
.change-manager summary.button { display: inline-block; list-style: none; margin: 0; padding: .6rem 1rem; }
.change-manager[open] .multi-select-options { margin-top: .5rem; border: 1px solid #888; border-radius: 4px; background: #fff; }
.change-manager select { max-width: 100%; }
.chain-chart-scroll { overflow-x: auto; padding: .5rem 0 1rem; }
.chain-chart { position: relative; margin: 0 auto; }
.chain-lines { position: absolute; inset: 0; pointer-events: none; }
.chain-lines path { fill: none; stroke: #175688; stroke-width: 2; }
.chain-lines marker path { fill: #175688; stroke: none; }
.chain-label { position: absolute; transform: translate(-50%, -50%); max-width: 12rem; padding: 0 .35rem; font-size: .75rem; background: #f3f5f7; border-radius: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain-node { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; padding: .25rem .75rem; border: 1px solid #ccd5df; border-radius: .5rem; background: #fff; overflow: hidden; }
.chain-node strong, .chain-node small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain-node-root { border: 2px solid #175688; background: #e8f1f8; }
.group-popover { max-width: min(28rem, 90vw); max-height: 80vh; overflow-y: auto; padding: 1rem 1.25rem; border: 1px solid #888; border-radius: 6px; background: #fff; color: inherit; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.group-popover h3 { margin-top: 0; }
.group-popover::backdrop { background: rgba(0,0,0,.25); }
.access-user { font-size: 1.6rem; margin: .5rem 0 1rem; }
.access-user strong { font-weight: 700; }
.access-user-links { font-size: 1rem; margin-left: 1rem; }
.permission-key { color: #666; font-family: monospace; margin-left: .35rem; }

.profile-top { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; align-items: start; }
.profile-top .panel > h2:first-child { margin-top: 0; }
.profile-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1.5rem; margin: 0; }
.profile-details dt { font-weight: 600; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }
.recent-logins { box-sizing: border-box; padding: .75rem 1rem; background: white; border: 1px solid #ccd5df; border-radius: .5rem; font-size: .75rem; }
.recent-logins h2 { margin: 0 0 .5rem; font-size: .9rem; }
.recent-logins ul { margin: 0; padding: 0; list-style: none; }
.recent-logins li { display: flex; flex-direction: column; padding: .25rem 0; border-top: 1px solid #e3e8ee; }
.recent-logins li:first-child { border-top: 0; }
.recent-logins .login-ip { color: #4a5a6e; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 760px) { .profile-top { grid-template-columns: 1fr; } }

/* Used stock list: the full-screen page keeps the look of the classic ASP page it replaced, so the portal's generic form and table styling is switched off here. */
.used-stock-screen { margin: 0; padding: 8px; min-height: 100vh; box-sizing: border-box; font-family: "Times New Roman", serif; font-size: 16px; color: #000; }
.used-stock form { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.used-stock table { width: auto; background: none; margin: 0; border-collapse: separate; }
.used-stock table[width="100%"] { width: 100%; }
.used-stock table[bgcolor] { background: #fff; }
.used-stock th, .used-stock td { padding: 1px; border-bottom: 0; overflow-wrap: normal; text-align: left; }
.used-stock td[align="center"] { text-align: center; }
.used-stock td[align="right"] { text-align: right; }
.used-stock td[align="left"] { text-align: left; }
.used-stock input:not([type=checkbox]):not([type=hidden]), .used-stock select { box-sizing: content-box; width: auto; max-width: none; padding: revert; border: revert; border-radius: revert; margin: revert; font: revert; }
.used-stock input[type=checkbox] { margin: revert; }
.used-stock p.used-stock-error { background: #ff9393; color: #000; padding: .5rem; margin: .5rem 0; }
.used-stock a.used-stock-exit { float: right; background: #fff; color: #000; border: 2px outset #d0d0d0; padding: 2px 14px; font: 13px Arial, sans-serif; text-decoration: none; margin: 4px 0 0 8px; }
.used-stock .tooltip { position: relative; display: inline-block; }
.used-stock .tooltip .tooltiptext { visibility: hidden; width: 300px; background-color: black; color: #fff; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; top: -5px; right: 110%; }
.used-stock .tooltip .tooltiptext::after { content: ""; position: absolute; top: 50%; left: 100%; margin-top: -5px; border-width: 5px; border-style: solid; border-color: transparent transparent transparent black; }
.used-stock .tooltip:hover .tooltiptext { visibility: visible; }
.used-stock a.used-stock-sort { color: #fff; text-decoration: none; } .used-stock a.used-stock-sort:hover { text-decoration: underline; }
