#blazor-error-ui { display: none; }
#components-reconnect-modal {
    position: fixed !important;
    inset: auto 0 1rem 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 1rem !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    pointer-events: none !important;
    z-index: 1080;
    display: none;
    text-align: center;
}
body.components-reconnect-show #components-reconnect-modal,
html.components-reconnect-show #components-reconnect-modal,
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying {
    display: block;
}
#components-reconnect-modal::after {
    content: "Reconnecting…";
    display: inline-block;
    pointer-events: none;
    background: #1f2937;
    color: #fff;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
}
#components-reconnect-modal.components-reconnect-failed::after { content: "Connection lost — tap a menu item to retry."; }

.sidebar-brand .brand-image { margin-right: .5rem; }
.small-box { position: relative; display: block; margin-bottom: 1.25rem; border-radius: .35rem; }
.small-box > .inner { padding: 10px; }
.small-box h3 { font-size: 2rem; font-weight: 700; margin: 0 0 10px; }
.small-box p { margin: 0; }
.small-box-icon { position: absolute; top: 12px; right: 16px; font-size: 4rem; opacity: .25; }
.small-box-footer { display: block; padding: 6px 10px; background: rgba(0,0,0,.1); color: inherit; text-decoration: none; }
.small-box-footer:hover { background: rgba(0,0,0,.18); color: inherit; }
a.small-box-clickable { color: inherit; text-decoration: none; display: block; }
a.small-box-clickable:hover { color: inherit; filter: brightness(0.97); }
.scan-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background: #000;
    color: #fff;
}
.scan-stage {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.scan-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: .65rem .85rem calc(.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.28) 70%, transparent);
    pointer-events: none;
}
.scan-back {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.38);
    border-radius: .75rem;
    padding: .55rem .8rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}
.scan-camera { flex: 1; display: flex; flex-direction: column; }
.scan-camera .barcode-scanner-container,
.scan-camera .scanner-viewport {
    flex: 1;
    margin: 0;
    border-radius: 0;
}
.scan-camera .scanner-video {
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    object-fit: cover;
}
.scan-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    background: #fff;
    color: #212529;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    max-height: 78vh;
    overflow-y: auto;
    box-shadow: 0 -12px 32px rgba(0,0,0,.35);
}
.scan-toast {
    position: absolute;
    top: calc(3.25rem + env(safe-area-inset-top));
    left: .75rem;
    right: .75rem;
    z-index: 16;
    background: #198754;
    color: #fff;
    border-radius: .5rem;
    padding: .55rem .75rem;
    font-size: .9rem;
    text-align: center;
}
.scan-start-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
}
.scanner-viewfinder {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scanner-viewfinder-frame {
    width: min(92%, 560px);
    height: 28%;
    min-height: 92px;
    max-height: 160px;
    border: 2px solid rgba(255,255,255,.92);
    border-radius: .55rem;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.28);
}
.scanner-viewfinder-laser {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 2px;
    background: #20c997;
    box-shadow: 0 0 10px #20c997;
    animation: scanner-laser 1.6s ease-in-out infinite;
}
@keyframes scanner-laser {
    0%, 100% { transform: translateY(-36px); opacity: .35; }
    50% { transform: translateY(36px); opacity: 1; }
}
.scanner-live-badge {
    position: absolute;
    top: calc(.7rem + env(safe-area-inset-top));
    left: .7rem;
    z-index: 6;
    background: #198754;
    color: #fff;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .55rem;
}
.scanner-fab {
    position: absolute;
    z-index: 8;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,.55);
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.scanner-fab-flip {
    right: calc(.85rem + env(safe-area-inset-right));
    bottom: calc(.85rem + env(safe-area-inset-bottom));
}
.scanner-fab-torch {
    left: calc(.85rem + env(safe-area-inset-left));
    bottom: calc(.85rem + env(safe-area-inset-bottom));
}
.scanner-fab-torch.is-on {
    background: #ffc107;
    color: #212529;
}
.scan-camera .scanner-fab-flip,
.scan-camera .scanner-fab-torch {
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
}
.barcode-scanner-container video,
.scanner-video {
    width: 100%;
    min-height: 220px;
    max-height: 60vh;
    object-fit: cover;
    background: #111;
    display: block;
}
.item-image-thumb { width: 88px; height: 88px; object-fit: cover; }
.inventory-table { min-width: 640px; }
.inventory-table thead th { position: sticky; top: 0; z-index: 1; }
.location-pie { width: 180px; max-width: 100%; height: auto; }
.location-pie .pie-total { font-size: 16px; font-weight: 700; fill: #212529; }
.location-pie .pie-caption { font-size: 8px; fill: #6c757d; }
.pie-swatch { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; vertical-align: middle; }
.pie-legend li + li { border-top: 1px solid var(--bs-border-color); }
.header-drop { min-width: 280px; max-width: 360px; }
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1rem; }
.kanban-column { min-width: 240px; max-width: 280px; flex: 1; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-top: 3px solid var(--status-color, #6c757d); border-radius: .5rem; }
.kanban-column-header { display: flex; align-items: center; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.kanban-dot { width: .7rem; height: .7rem; border-radius: 50%; }
.kanban-column-body { min-height: 8rem; padding: .75rem; }
.kanban-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .4rem; padding: .6rem .75rem; margin-bottom: .6rem; cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.message-thread { max-height: 420px; overflow-y: auto; }
.item-edit-page .card-header .card-title { font-size: 1rem; font-weight: 600; }
.item-edit-stats .card { border-left: 3px solid var(--bs-primary); }
.barcode-row { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .65rem .8rem; background: var(--bs-body-bg); }
.item-kind-card {
    text-align: left;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    border-radius: .5rem;
    padding: .75rem .85rem;
}
.item-kind-card.active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .15rem rgba(13, 110, 253, .15);
}
.item-edit-dock {
    position: sticky;
    bottom: 0;
    z-index: 1030;
    display: flex;
    gap: .5rem;
    padding: .75rem;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
}
@media (min-width: 768px) {
    .item-edit-dock { display: none; }
}
