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;
}

:root {
    --app-background: #f5f7fb;
    --app-surface: #ffffff;
    --app-border: #e3e7ef;
    --app-primary: #1b6ec2;
    --app-primary-dark: #14508f;
    --app-text-muted: #4b5563;
}

body {
    background: var(--app-background);
    color: #1f2937;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-shell__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-shell__home {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--app-primary);
    color: #ffffff;
    text-decoration: none;
}

.app-shell__home svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.app-shell__title {
    font-weight: 600;
    font-size: 1.125rem;
}

.app-shell__spacer {
    flex: 1 1 auto;
}

.app-shell__user-menu {
    position: relative;
}

.app-shell__user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--app-text-muted);
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 0.6rem;
    transition: background-color 150ms ease;
    list-style: none;
}

.app-shell__user:hover,
.app-shell__user:focus-visible {
    background-color: rgba(99, 102, 241, 0.1);
    outline: none;
}

.app-shell__user::-webkit-details-marker {
    display: none;
}

.app-shell__user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell__user-caret {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 150ms ease;
}

.app-shell__user-menu[open] .app-shell__user-caret {
    transform: rotate(225deg);
}

.app-shell__user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    min-width: 200px;
    padding: 0.4rem 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 20;
}

.app-shell__user-menu-link {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: left;
    color: var(--app-text-muted);
    text-decoration: none;
    background: transparent;
    border: none;
    font: inherit;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}

.app-shell__user-menu-link:hover,
.app-shell__user-menu-link:focus-visible {
    color: var(--app-primary);
    background-color: rgba(99, 102, 241, 0.12);
    outline: none;
}

.app-shell__logout {
    margin: 0;
}

.link-button {
    border: none;
    background: transparent;
    color: var(--app-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.link-button:hover,
.link-button:focus {
    color: var(--app-primary-dark);
    text-decoration: underline;
}

.app-shell__main {
    flex: 1 1 auto;
    padding: 1.5rem 1rem 2rem;
    display: flex;
    justify-content: center;
}

.app-shell__content {
    width: min(1100px, 100%);
}

.app-breadcrumb {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--app-text-muted);
}

.app-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.app-breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-breadcrumb__item + .app-breadcrumb__item::before {
    content: "";
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%234b5563' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 4 4 4-4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.app-breadcrumb__link {
    color: inherit;
    text-decoration: none;
    transition: color 120ms ease;
}

.app-breadcrumb__link:hover,
.app-breadcrumb__link:focus-visible {
    color: var(--app-primary);
    text-decoration: underline;
}
input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea,
.form-control { padding: 0.75rem 0.9rem; border-radius: 0.75rem; border: 1px solid #cbd5f5; background-color: #f8fafc; font-size: 0.95rem; transition: border 0.2s ease, box-shadow 0.2s ease; }

input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

.app-breadcrumb__current {
    font-weight: 600;
    color: #1f2937;
}

.home-page__intro {
    margin-bottom: 1.5rem;
    text-align: center;
}

.home-page__title {
    font-weight: 700;
    font-size: 1.75rem;
}

.home-page__subtitle {
    color: var(--app-text-muted);
    margin-top: 0.25rem;
}

.home-page__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--app-surface);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 150ms ease, box-shadow 150ms ease;
    cursor: pointer;
}

.home-card:hover,
.home-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.home-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(27, 110, 194, 0.1);
    color: var(--app-primary);
    display: grid;
    place-items: center;
}

.home-card__icon svg {
    width: 32px;
    height: 32px;
}

.home-card__label {
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--app-surface);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.auth-card .form-floating label {
    color: var(--app-text-muted);
}

.auth-card .btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.auth-card .btn-primary:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

@media (min-width: 768px) {
    .app-shell__main {
        padding: 2.5rem 2rem 3rem;
    }
}

.not-found {
    text-align: center;
    margin-top: 3rem;
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.inventory-page {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.inventory-page__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
}

.inventory-page__brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.inventory-page__icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 2px solid #0f172a;
    background: #ffffff;
    color: #0f172a;
}

.inventory-page__icon-button svg {
    width: 22px;
    height: 22px;
}

.inventory-page__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.inventory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    border: 2px solid #0f172a;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.inventory-card:focus,
.inventory-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.inventory-card__icon {
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    border-radius: 24px;
    border: 2px solid #0f172a;
}

.inventory-card__icon svg {
    width: 40px;
    height: 40px;
    color: #0f172a;
}

.inventory-card__label {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.inventory-detail {
    background: #ffffff;
    border-radius: 24px;
    border: 2px solid #0f172a;
    padding: 2.5rem;
    max-width: 720px;
}

.inventory-detail h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.inventory-detail p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--app-text-muted);
}

/* Inventory intake page */
.intake-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.intake-page__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.intake-page__title {
    font-size: 1.75rem;
    font-weight: 700;
}

.intake-page__subtitle {
    color: var(--app-text-muted);
    font-size: 1rem;
}

.intake-alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.intake-alert--success {
    background: #ecfdf5;
    border-color: #34d399;
    color: #047857;
}

.intake-alert--error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.intake-loading {
    text-align: center;
    color: var(--app-text-muted);
    padding: 1rem 0;
}

.intake-step {
    background: var(--app-surface);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.intake-step__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.intake-empty {
    text-align: center;
    color: var(--app-text-muted);
    margin: 1rem 0;
}

.intake-empty p {
    margin: 0 0 0.5rem;
}

.intake-empty__link {
    color: var(--app-primary);
    font-weight: 600;
    text-decoration: none;
}

.intake-empty__link:hover,
.intake-empty__link:focus-visible {
    color: var(--app-primary-dark);
    text-decoration: underline;
}

.intake-storage-list {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.intake-storage-card {
    background: #e3edff;
    border: none;
    border-radius: 16px;
    padding: 1.2rem 1rem;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.intake-storage-card:hover,
.intake-storage-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    background: #d6e6ff;
}

.intake-storage-card:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.intake-storage-card__description {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--app-text-muted);
}

.intake-scan__header {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
    align-items: start;
}

.intake-scan__scanner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.intake-scan__scanner .scan-page__scanner {
    width: 100%;
}

.intake-scan__scanner .scan-page__viewer {
    align-items: stretch;
}

.intake-scan__scanner .scan-page__status {
    width: 100%;
}

.intake-scan__error {
    margin-top: 1rem;
    max-width: 420px;
}

.intake-scan__summary {
    background: #f1f5f9;
    border-radius: 16px;
    border: 1px solid var(--app-border);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.intake-scan__summary-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--app-text-muted);
    letter-spacing: 0.05em;
}

.intake-scan__storage-name {
    font-size: 1.15rem;
    font-weight: 600;
}

.intake-scan__counter {
    font-size: 0.95rem;
    color: var(--app-text-muted);
}

.intake-scan__table-wrapper {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.intake-scan__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}

.intake-scan__table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 0.75rem;
    background: #eef2ff;
    color: #1f2937;
}

.intake-scan__table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--app-border);
    font-size: 0.95rem;
}

.intake-scan__quantity {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.intake-step__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.intake-button {
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.intake-button--primary {
    background: var(--app-primary);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(27, 110, 194, 0.25);
}

.intake-button--primary:disabled {
    background: #93c5fd;
    box-shadow: none;
    cursor: not-allowed;
}

.intake-button--primary:not(:disabled):hover,
.intake-button--primary:not(:disabled):focus {
    transform: translateY(-2px);
    background: var(--app-primary-dark);
}

.intake-button--secondary {
    background: #e2e8f0;
    color: #1f2937;
}

.intake-button--secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.intake-button--secondary:not(:disabled):hover,
.intake-button--secondary:not(:disabled):focus {
    transform: translateY(-2px);
    background: #cbd5f5;
}

@media (max-width: 1024px) {
    .intake-scan__header {
        grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .intake-scan__header {
        grid-template-columns: 1fr;
    }

    .intake-scan__summary {
        max-width: none;
    }
}
