.app-bar {
    border-bottom: 1px solid var(--mud-palette-divider);
}

.app-bar-titles {
    min-width: 0;
    margin-left: 0.5rem;
}

.app-bar-title,
.app-bar-subtitle,
.app-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-bar-title {
    line-height: 1.2;
}

.app-bar-subtitle {
    line-height: 1.2;
    color: var(--mud-palette-text-secondary);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-brand-logo {
    height: 2.25rem;
    width: auto;
    display: block;
}

.app-context-text {
    flex: 1 1 auto;
    min-width: 0;
}

.app-narrow {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
}

.app-mode-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 599.98px) {
    .app-mode-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

.app-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-toolbar-toggle {
    flex: 1 1 320px;
    max-width: 480px;
}

.app-loading {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.app-stat,
.app-panel {
    height: 100%;
}

.app-stat-value {
    margin: 0.125rem 0 0.25rem;
    overflow: hidden;
    font-size: clamp(1.125rem, 2.4vw, 1.5rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-stat-trend {
    min-height: 1.25rem;
}

.app-reward {
    height: 100%;
}

.app-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin: 0;
}

.app-facts dt {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.app-facts dd {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}


.app-code {
    padding: 0.125rem 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--mud-palette-background);
    border-radius: 6px;
}

.app-input-code input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
    padding: 1rem;
    text-align: center;
}

.app-qr-item img {
    width: 100%;
    max-width: 180px;
    height: auto;
    image-rendering: pixelated;
}

.app-cell-number {
    font-variant-numeric: tabular-nums;
}

.app-scanner {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    background: rgba(0, 38, 53, 0.85);
}

.app-scanner-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    overflow-y: auto;
    background: var(--mud-palette-surface);
}

.app-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-scanner-view {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1;
    background: #001b26;
    border-radius: var(--mud-default-borderradius);
}

.app-scanner-view.is-hidden {
    display: none;
}

.app-scanner-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-scanner-frame {
    position: absolute;
    inset: 16%;
    pointer-events: none;
    border: 3px solid var(--mud-palette-secondary);
    border-radius: var(--mud-default-borderradius);
    box-shadow: 0 0 0 100vmax rgba(0, 27, 38, 0.35);
}

.app-scanner-status {
    min-height: 1.5rem;
    text-align: center;
}

@media (min-width: 600px) {
    .app-scanner {
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
    }

    .app-scanner-panel {
        max-width: 480px;
        max-height: 100%;
        border-radius: var(--mud-default-borderradius);
    }
}

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: none;
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    color: #000;
    background: #ffe08a;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    cursor: pointer;
}
