/* Template leftovers replaced: validation colours come from the theme (light and dark) */
.validation-message {
    color: var(--mud-palette-error);
}

/* Page background before MudBlazor's theme loads, so the dark OS theme does not flash white */
html {
    color-scheme: light dark;
}

/* The theme chosen in the header menu (data-theme, set by index.html before the first paint) wins over the OS */
html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: var(--mud-palette-background, #32333d);
    color: var(--mud-palette-text-primary, rgba(255, 255, 255, .7));
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) body {
        background: var(--mud-palette-background, #32333d);
        color: var(--mud-palette-text-primary, rgba(255, 255, 255, .7));
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.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: "Произошла ошибка."
    }

/* Startup splash (index.html): logo, name and a thin progress bar in the brand colour. Plain CSS, because it is
   shown before MudBlazor and its theme variables load. */
.app-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 28vh;
    font-family: Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
}

.app-splash-logo {
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(89, 74, 226, .35);
    animation: app-splash-in .4s ease-out both, app-splash-pulse 1.8s ease-in-out .4s infinite;
}

.app-splash-name {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: #424242;
    animation: app-splash-in .4s ease-out .1s both;
}

.app-splash-bar {
    width: 180px;
    height: 4px;
    margin-top: 6px;
    border-radius: 2px;
    background: rgba(89, 74, 226, .15);
    overflow: hidden;
    animation: app-splash-in .4s ease-out .2s both;
}

.app-splash-bar span {
    display: block;
    width: var(--blazor-load-percentage, 4%);
    min-width: 4%;
    height: 100%;
    border-radius: 2px;
    background: #594ae2;
    transition: width .15s ease-out;
}

@keyframes app-splash-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

@keyframes app-splash-pulse {
    50% {
        transform: scale(1.04);
    }
}

html[data-theme="dark"] .app-splash-name {
    color: rgba(255, 255, 255, .85);
}

html[data-theme="dark"] .app-splash-bar {
    background: rgba(165, 156, 242, .2);
}

html[data-theme="dark"] .app-splash-bar span {
    background: #a59cf2;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .app-splash-name {
        color: rgba(255, 255, 255, .85);
    }

    html:not([data-theme="light"]) .app-splash-bar {
        background: rgba(165, 156, 242, .2);
    }

    html:not([data-theme="light"]) .app-splash-bar span {
        background: #a59cf2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-splash-logo,
    .app-splash-name,
    .app-splash-bar {
        animation: none;
    }
}

code {
    color: var(--mud-palette-text-primary);
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
}

/* Admin log viewer */
.log-view {
    overflow: hidden;
}

.log-scroll {
    display: flex;
    flex-direction: column-reverse;
    height: calc(100vh - 290px);
    min-height: 300px;
    overflow: auto;
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.45;
}

/* column-reverse puts free space above short content; the auto margin moves it below, so lines start at the top */
.log-scroll > div {
    margin-bottom: auto;
}

/* File picker and line filter share one size */
.log-toolbar-field {
    flex: 0 0 290px;
    width: 290px;
    margin-top: 0;
}

.log-line {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0 12px;
}

.log-wrn {
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent);
}

.log-err {
    background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
    color: var(--mud-palette-error);
}

.log-stack {
    color: var(--mud-palette-text-secondary);
}

/* ---- Stage 3: shared UX standards. Colours only from MudBlazor theme variables (light and dark). ---- */

/* Visible keyboard focus everywhere */
:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.page-header-title {
    font: inherit;
    margin: 0;
}

/* .page-fill: the element takes all the window height left under the header and the page content above it
   (Categories, Catalog, lists, logs) and scrolls its own content inside. The main area becomes a column exactly one
   window high only on such pages. A phone keeps the normal page scroll and the fallback heights of the elements. */
@media (min-width: 701px) {
    .mud-main-content:has(.page-fill) {
        display: flex;
        flex-direction: column;
        height: 100dvh;
    }

    .mud-main-content:has(.page-fill) > .mud-container {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
    }

    .page-fill {
        flex: 1 1 0;
        min-height: 420px;
    }

    /* К1 with Fill: the toolbar and the pager keep their size, the rows area takes the rest */
    .data-table.page-fill {
        display: flex;
        flex-direction: column;
    }

    .data-table.page-fill > .mud-table-container {
        flex: 1 1 0;
        min-height: 0;
    }

    .data-table.page-fill > :not(.mud-table-container) {
        flex: none;
    }

    .log-view.page-fill {
        display: flex;
        flex-direction: column;
    }

    .log-view.page-fill > .log-scroll {
        flex: 1 1 0;
        min-height: 0;
    }
}

/* PageHeader: title and subtitle on the left (the subtitle wraps under the title), actions at the top right */
.page-header {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
    min-height: 42px;
}

.page-header-text {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    min-width: 0;
}

.page-header-h {
    flex: none;
}

.page-header-subtitle {
    flex: 1 1 260px;
    min-width: 0;
}

.page-header-actions {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
}

@media (max-width: 700px) {
    .page-header {
        flex-wrap: wrap;
    }

    /* Several page buttons (auction transitions) wrap under the title instead of running off the screen */
    .page-header-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}

.connection-banner {
    position: sticky;
    top: var(--mud-appbar-height);
    z-index: 5;
}

/* EmptyState */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 16px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

/* К1 DataTable */
.data-table-search {
    flex: 0 1 320px;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
}

/* The toolbar grows when search and filters wrap on a narrow screen instead of overlapping the title and rows */
.data-table .mud-toolbar {
    height: auto;
    min-height: 64px;
}

/* A list never shrinks to nothing on a short screen; with many rows it scrolls inside, the pager stays visible */
.data-table .mud-table-container {
    min-height: 220px;
}

/* Phone: a list has no inner scroll and grows with its rows, the page scrolls instead. A box of 100vh minus the
   header inside the scrolling page hid its last rows behind the browser toolbar (100vh is the height without it).
   The breakpoint is the same as in data-table.js. */
@media (max-width: 700px) {
    .data-table .mud-table-container {
        height: auto !important;
    }

    .mud-main-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* Search and filters of a list on one line: same height, no label offset */
.data-table .mud-toolbar .mud-input-control {
    margin-top: 0;
    margin-bottom: 0;
}

/* Compact horizontal padding: the lot list with its actions fits 1280 px without horizontal scrolling */
.data-table .mud-table-row > .mud-table-cell {
    padding-left: 8px;
    padding-right: 8px;
}

.data-table .mud-table-row > .mud-table-cell:first-child {
    padding-left: 16px;
}

.data-table .mud-table-row > .mud-table-cell:last-child {
    padding-right: 16px;
}

/* Row actions stay visible at the right edge when a narrow screen (tablet) scrolls the table horizontally */
.data-table-actions,
.data-table-actions-head {
    position: sticky;
    right: 0;
    background: var(--mud-palette-surface);
}

.data-table-actions {
    z-index: 1;
    white-space: nowrap;
    text-align: right;
}

.data-table .mud-table-row:hover > .data-table-actions {
    background: linear-gradient(var(--mud-palette-table-hover), var(--mud-palette-table-hover)), var(--mud-palette-surface);
}

/* К2 LotTile */
.lot-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    overflow: hidden;
    /* Keeps the z-index of the selection frame inside the tile (sticky headers stay above it) */
    isolation: isolate;
    user-select: none;
    transition: opacity .15s, box-shadow .15s;
}

.lot-tile:hover {
    box-shadow: var(--mud-elevation-2);
}

/* Selection frame: an overlay above the photo and the caption, so it is equally thick along the whole outline
   (an inset shadow of the tile itself is hidden under the photo area). Painted only, nothing shifts. */
.lot-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: calc(var(--mud-default-borderradius) - 1px);
    box-shadow: 0 0 0 0 var(--mud-palette-primary) inset;
    pointer-events: none;
}

.lot-tile-selected {
    border-color: var(--mud-palette-primary);
}

.lot-tile-selected::after,
.drag-chosen .lot-tile::after {
    box-shadow: 0 0 0 2px var(--mud-palette-primary) inset;
}

/* A lot that has just landed in a catalog place: one short pulse of the primary colour */
.lot-tile-landed {
    animation: lot-landed-pop .25s ease-out, lot-landed 1.6s ease-out;
}

.lot-tile-landed::after {
    animation: lot-landed-frame 1.6s ease-out;
}

@keyframes lot-landed-frame {
    0%,
    30% {
        box-shadow: 0 0 0 3px var(--mud-palette-primary) inset;
    }
}

/* The tile "drops" into the place, then the primary-colour frame fades out */
@keyframes lot-landed-pop {
    from {
        transform: scale(.92);
        opacity: .6;
    }
}

@keyframes lot-landed {
    0%,
    30% {
        box-shadow: 0 0 0 2px var(--mud-palette-primary);
        background: var(--mud-palette-primary-hover);
    }
}

.lot-tile-dimmed {
    opacity: .4;
}

.lot-tile-image {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-gray);
}

/* Absolutely positioned, so a portrait photo cannot stretch the square frame */
.lot-tile-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lot-tile-is-sold .lot-tile-image img {
    filter: grayscale(1);
    opacity: .5;
}

.lot-tile-position,
.lot-tile-sold {
    position: absolute;
    top: 4px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: .75rem;
    line-height: 20px;
    font-weight: 600;
}

.lot-tile-position {
    left: 4px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.lot-tile-sold {
    right: 4px;
    background: var(--mud-palette-error);
    color: var(--mud-palette-error-text);
}

.lot-tile-body {
    padding: 4px 8px 6px;
    font-size: .8125rem;
    line-height: 1.3;
}

.lot-tile-number {
    font-weight: 600;
}

.lot-tile-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    color: var(--mud-palette-text-secondary);
}

.lot-tile-compact .lot-tile-body {
    font-size: .75rem;
    padding: 2px 6px 4px;
}

.lot-tile-action {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: flex;
    padding: 2px;
    border: none;
    border-radius: 50%;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    box-shadow: var(--mud-elevation-1);
    cursor: pointer;
    opacity: 0;
}

.lot-tile-action-second {
    right: 32px;
}

.lot-tile-action-third {
    right: 60px;
}

.lot-tile-sell {
    color: var(--mud-palette-error);
}

/* "Открыть" sits in the top right corner of the photo; on a sold mark it goes under the "Продано" badge */
.lot-tile-open {
    top: 4px;
    bottom: auto;
    color: var(--mud-palette-primary);
}

.lot-tile-is-sold .lot-tile-open {
    top: 28px;
}

.lot-tile:hover .lot-tile-action,
.lot-tile-action:focus-visible {
    opacity: 1;
}

/* A touch screen has no hover, so the way to the lot card is always visible there */
@media (hover: none) {
    .lot-tile-open {
        opacity: 1;
    }
}

/* К2 ThumbGrid */
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 150px), 1fr));
    gap: 8px;
    align-content: start;
}

/* Tiles have an exact height (photo frame + two-line caption), so every row of the grid is the same height.
   No content-visibility here: its size estimate for off-screen tiles made the scrollbar thumb drift from the mouse
   on the first pass (a few hundred tiles lay out fast enough without it). */
.thumb-grid .lot-tile-image {
    aspect-ratio: auto;
    height: var(--thumb-size, 150px);
}

.thumb-grid .lot-tile-body {
    height: 62px;
    overflow: hidden;
}

.thumb-grid-item {
    border-radius: var(--mud-default-borderradius);
    cursor: grab;
}

/* "Категории": the usual arrow over tiles, as the user asked */
.thumb-grid-plain .thumb-grid-item {
    cursor: default;
}

/* К2 DropZone */
.drop-zone {
    position: relative;
    min-height: 48px;
    border-radius: var(--mud-default-borderradius);
}

.drop-zone-empty {
    border: 1px dashed var(--mud-palette-lines-inputs);
}

.drop-zone-active {
    background: var(--mud-palette-surface);
}

.drop-zone-item {
    height: 100%;
    cursor: grab;
}

/* SortableJS states */
.drag-ghost {
    opacity: .35;
}

/* К3 SaveBar */
.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-top: 16px;
    padding: 8px 16px;
}

.save-bar-status {
    display: inline-flex;
    align-items: center;
}

/* Development-only component demo */
.demo-filter {
    flex: 0 0 240px;
    margin-top: 0;
}

.demo-row-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
}

.demo-dnd {
    display: grid;
    grid-template-columns: 220px minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
    height: calc(100vh - 290px);
    min-height: 480px;
}

.demo-dnd > * {
    overflow: auto;
}

.demo-catalog-cells {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.demo-cell {
    min-height: 150px;
}

.demo-cell-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-secondary);
}

/* К7: background jobs */
.job-indicator-menu {
    width: 360px;
    max-width: 90vw;
    max-height: 70vh;
    overflow-y: auto;
}

/* The count sits inside the button corner: the default overlap offset pushes it above the dense app bar */
.job-indicator-badge .mud-badge.mud-badge-top.right.mud-badge-overlap {
    inset: 0 0 auto auto;
}

.job-indicator-spin .mud-icon-root {
    animation: job-spin 1.6s linear infinite;
}

/* Notification center (header bell) */
.notification-menu {
    width: 400px;
    max-width: 92vw;
    max-height: 70vh;
    overflow-y: auto;
}

.notification-menu-head {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px 6px 16px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-link:hover {
    background: var(--mud-palette-action-default-hover);
}

.notification-icon {
    margin-top: 2px;
    flex: none;
}

.notification-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.notification-text {
    color: var(--mud-palette-text-primary);
    font-size: .875rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-decoration: none;
}

a.notification-text:hover {
    text-decoration: underline;
}

.notification-meta,
.notification-where {
    color: var(--mud-palette-text-secondary);
    font-size: .75rem;
}

.notification-where {
    align-self: flex-start;
    padding: 0 6px;
    border-radius: 4px;
    border: 1px solid var(--mud-palette-lines-default);
}

.notification-dot {
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
}

@keyframes job-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lot-tile-landed,
    .lot-tile-landed::after,
    .job-indicator-spin .mud-icon-root {
        animation: none;
    }
}

.job-progress {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    padding: 12px 16px;
}

.job-progress-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: none;
}

.job-progress-compact {
    border: none;
    padding: 0;
}

/* К6: photo uploader */
.file-uploader {
    border: 2px dashed var(--mud-palette-lines-inputs);
    border-radius: var(--mud-default-borderradius);
    padding: 16px;
    transition: border-color 0.15s, background-color 0.15s;
}

.file-uploader.file-uploader-readonly {
    border: none;
    padding: 0;
}

.file-uploader.file-drop-active {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-hover);
}

.file-uploader-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    color: var(--mud-palette-text-secondary);
}

.upload-tile {
    position: relative;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    overflow: hidden;
    cursor: grab;
}

.upload-tile-failed {
    border-color: var(--mud-palette-error);
}

.upload-tile-image {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--mud-palette-background-gray);
}

.upload-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-tile-percent {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.upload-tile-badges {
    position: absolute;
    left: 6px;
    top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upload-tile-number,
.upload-tile-main {
    border-radius: 10px;
    font-size: 0.75rem;
    line-height: 20px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.upload-tile-number {
    box-sizing: border-box;
    min-width: 20px;
    padding: 0 6px;
    font-weight: 600;
    text-align: center;
}

.upload-tile-main {
    padding: 0 8px;
}

.upload-tile-body {
    padding: 4px 8px 6px;
    font-size: 0.75rem;
    min-height: 40px;
}

.upload-tile-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-tile-size {
    color: var(--mud-palette-text-secondary);
}

.upload-tile-error {
    color: var(--mud-palette-error);
}

/* Photo viewer dialog: the photo fits the window, arrows sit over its edges. */
.photo-viewer-content {
    padding: 0 !important;
}

.photo-viewer-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: min(75vh, 1200px);
    background: var(--mud-palette-background-gray);
    outline: none;
}

.photo-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Other photos of the lot: out of the flow and invisible, but still loaded by the browser. */
.photo-viewer-image-hidden {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

.photo-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.photo-viewer-nav {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    /* Above the photos and the counter, so the whole circle takes the click. */
    z-index: 2;
    min-width: 56px;
    min-height: 56px;
    background: var(--mud-palette-surface) !important;
    opacity: 0.85;
    /* No double-tap zoom on phones: quick taps in a row were taken as a zoom gesture instead of two clicks. */
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* The icon and the ripple never become the click target, the button itself does. */
.photo-viewer-nav * {
    pointer-events: none;
}

.photo-viewer-nav:hover,
.photo-viewer-nav:focus-visible {
    opacity: 1;
}

.photo-viewer-prev {
    left: 8px;
}

.photo-viewer-next {
    right: 8px;
}

.photo-viewer-counter {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.875rem;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    opacity: 0.9;
}

.upload-tile-actions {
    position: absolute;
    right: 2px;
    top: 2px;
    display: flex;
    background: var(--mud-palette-surface);
    border-radius: var(--mud-default-borderradius);
    opacity: 0.92;
    cursor: default;
}

/* Lots */
.lots-filter,
.data-table-filter {
    min-width: 200px;
    max-width: 240px;
}

.lots-row-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.lots-row-title {
    min-width: 200px;
    max-width: 420px;
}

/* Phone (the table shows rows as cards): a large photo on the left, number, title and category beside it,
   the other fields under them across the whole card */
@media (max-width: 599.98px) {
    .data-table .mud-table-row:has(> .lots-row-photo) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 12px;
        padding-top: 8px;
    }

    .data-table .mud-table-row > .lots-row-photo:first-child {
        grid-row: span 3;
        padding-left: 12px;
        align-items: flex-start;
        justify-content: flex-start;
        padding-right: 0;
    }

    .data-table .mud-table-row > .lots-row-main,
    .data-table .mud-table-row > .lots-row-side {
        grid-column: 2;
        padding-left: 0;
    }

    .data-table .mud-table-row > .lots-row-main::before {
        display: none;
    }

    .data-table .mud-table-row:has(> .lots-row-photo) > :not(.lots-row-photo, .lots-row-main, .lots-row-side) {
        grid-column: 1 / -1;
    }

    .lots-row-photo .lots-row-thumb,
    .lots-row-photo .lots-row-nophoto {
        flex: none;
        width: 120px;
        height: 120px;
        border-radius: var(--mud-default-borderradius);
    }

    .lots-row-photo .lots-row-nophoto {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--mud-palette-action-default-hover);
    }

    .lots-row-title {
        min-width: 0;
        font-weight: 500;
    }
}

.lot-card-category {
    min-width: 220px;
    flex: 1 1 220px;
}

.lot-card-number {
    min-width: 160px;
}

.lot-card-price {
    flex: 1 1 140px;
}

/* Categories page: folders (drop zones) on the left, tiles of the selected category on the right. */
.categories-board {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - 230px);
    min-height: 420px;
}

.categories-board > * {
    overflow: auto;
}

/* Sticky head of the tiles panel (the panel itself scrolls); its background hides the tiles passing under it */
.categories-lots-head {
    position: sticky;
    top: -8px;
    z-index: 3;
    margin: -8px -8px 8px;
    padding: 8px;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.categories-search {
    flex: 0 1 280px;
    min-width: 200px;
    margin-top: 0;
}

.categories-search.mud-input-control {
    margin-bottom: 0;
}

.categories-folder {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 40px;
    border: 1px solid transparent;
}

.categories-folder.drop-zone-empty {
    border-color: transparent;
}

.categories-folder .drag-ghost,
.categories-folder .thumb-grid-item {
    display: none;
}

.categories-folder-button {
    text-transform: none;
    flex: 1;
    min-width: 0;
}

.categories-folder-name {
    flex: 1;
    text-align: left;
}

.categories-folder-count {
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .categories-board {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }
}

/* "Аукцион": status steps, facts table and the read-only catalog (4 columns, as the editor sees it) */
.auction-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.auction-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mud-palette-text-secondary);
}

.auction-step-done {
    color: var(--mud-palette-success);
}

.auction-step-current {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.auction-facts th {
    width: 220px;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
}

.catalog-view {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-width: 900px;
}

.catalog-gap {
    position: relative;
    min-height: 120px;
    border: 1px dashed var(--mud-palette-lines-inputs);
    background: transparent;
}

/* "Каталог аукциона" (editor): lots of a category on the left, 4-column catalog on the right, both scroll on their own */
.catalog-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - 250px);
    min-height: 480px;
}

.catalog-lots,
.catalog-places {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.catalog-tabs {
    flex: none;
}

/* Same height with or without the switch and buttons, so switching tabs does not shift the grid. */
.catalog-lots-toolbar {
    flex: none;
    min-height: 48px;
}

.catalog-lots-grid,
.catalog-places-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px;
}

.catalog-cells {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

/* Every place has the same exact height (empty, lot or sold mark). No content-visibility: see ThumbGrid tiles. */
.catalog-cell {
    height: 172px;
}

.catalog-cell .lot-tile-image {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.catalog-cell .lot-tile-body {
    flex: none;
    height: 46px;
    overflow: hidden;
}

/* The placeholder in a place is invisible but keeps the place size: SortableJS measures the dragged element after
   giving it this class, and display: none made the floating copy under the cursor 0 x 0 for drags inside the catalog */
.catalog-cell .drag-ghost {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.catalog-cell-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-text-secondary);
}

/* A tablet keeps the lots and the catalog side by side (each scrolls on its own), so a lot can be dragged across */
@media (max-width: 700px) {
    .catalog-board {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }
}

/* The place a dragged lot will land on (the placeholder itself is hidden in cells) */
.catalog-cell.drop-target {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 1px;
}


/* ---- Login and setup pages (AuthLayout): gavel strike, drifting bidder paddles, soft glows. Transforms and opacity
   only, so the animation stays on the GPU and costs nothing for the app itself. ---- */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg::before,
.auth-bg::after {
    content: "";
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--mud-palette-primary) 22%, transparent) 0%, transparent 65%);
    animation: auth-glow 22s ease-in-out infinite alternate;
}

.auth-bg::before {
    top: -35vmax;
    left: -20vmax;
}

.auth-bg::after {
    right: -25vmax;
    bottom: -40vmax;
    animation-duration: 28s;
    animation-direction: alternate-reverse;
}

@keyframes auth-glow {
    to {
        transform: translate(12vmax, 8vmax) scale(1.1);
    }
}

.auth-paddle {
    position: absolute;
    bottom: -140px;
    color: var(--mud-palette-primary);
    opacity: .13;
    animation: auth-paddle-rise linear infinite;
}

.auth-paddle svg {
    display: block;
    fill: currentColor;
    transform: rotate(-8deg);
}

.auth-paddle text {
    fill: var(--mud-palette-background);
    font: 700 13px Roboto, "Segoe UI", sans-serif;
}

@keyframes auth-paddle-rise {
    from {
        transform: translate3d(0, 0, 0) rotate(-6deg);
    }

    50% {
        transform: translate3d(18px, -60vh, 0) rotate(6deg);
    }

    to {
        transform: translate3d(0, -125vh, 0) rotate(-6deg);
    }
}

.auth-layout,
.auth-content {
    position: relative;
    z-index: 1;
    background: transparent;
}

.auth-title,
.auth-card {
    animation: auth-rise .6s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-card {
    animation-delay: .12s;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

.auth-logo {
    border-radius: 16px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--mud-palette-primary) 40%, transparent);
}

/* The gavel is raised, strikes the block and settles; the block sends out one ring */
.auth-gavel {
    transform-box: view-box;
    /* Pivot at the end of the handle (bottom right); a positive angle lifts the head away from the block */
    transform-origin: 51px 48px;
    animation: auth-gavel-strike 1.1s cubic-bezier(.3, 0, .2, 1) .25s both;
}

@keyframes auth-gavel-strike {
    0% {
        transform: rotate(26deg);
    }

    55% {
        transform: rotate(30deg);
    }

    72% {
        transform: rotate(-6deg);
    }

    84% {
        transform: rotate(3deg);
    }

    100% {
        transform: rotate(0);
    }
}

.auth-impact {
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: auth-impact .7s ease-out 1.05s;
}

@keyframes auth-impact {
    from {
        opacity: .8;
        transform: scale(.3);
    }

    to {
        opacity: 0;
        transform: scale(1.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg::before,
    .auth-bg::after,
    .auth-paddle,
    .auth-title,
    .auth-card,
    .auth-gavel,
    .auth-impact {
        animation: none;
    }

    .auth-paddle {
        display: none;
    }
}

/* Workspaces: a fixed accent per workspace in the header, the switcher and the list */
.workspace-color-0 { --workspace-color: #f59e0b; }
.workspace-color-1 { --workspace-color: #10b981; }
.workspace-color-2 { --workspace-color: #38bdf8; }
.workspace-color-3 { --workspace-color: #f472b6; }
.workspace-color-4 { --workspace-color: #a3e635; }
.workspace-color-5 { --workspace-color: #fb923c; }

.workspace-bar {
    box-shadow: inset 0 -3px 0 var(--workspace-color);
}

.workspace-dot {
    display: inline-block;
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--workspace-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
}

.workspace-button {
    gap: 8px;
    max-width: 260px;
    text-transform: none;
}

/* The gap of the button does not reach the spans inside the MudBlazor label; the margin also clears the dot's ring */
.workspace-button-name {
    margin-left: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.workspace-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.workspace-menu-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    line-height: 1.3;
}

.workspace-menu-status {
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 600px) {
    .workspace-button {
        max-width: 130px;
    }
}

/* Header user menu: name and role next to the icon; on a phone only the icon, the name is the first menu line */
.user-menu-button {
    text-transform: none;
    min-width: 0;
}

.user-menu-caption {
    display: none;
}

@media (max-width: 600px) {
    .app-name,
    .user-menu-name {
        display: none;
    }

    .user-menu-button .mud-button-icon-start {
        margin: 0;
    }

    .user-menu-caption {
        display: flex;
    }

    .workspace-button {
        max-width: 150px;
    }
}

/* Disk usage indicator (StorageUsage): the ring with the percentage inside, the stacked bar of the disk and its legend */
.storage-ring {
    position: relative;
    display: inline-flex;
    flex: none;
}

.storage-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.storage-bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

.storage-bar > .mud-tooltip-root {
    display: block;
    height: 100%;
}

.storage-segment {
    height: 100%;
    width: 100%;
    border-right: 1px solid var(--mud-palette-surface);
}

.storage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.storage-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px;
}

.storage-legend b {
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    margin-left: 4px;
}

.storage-hints {
    margin: 0;
    padding-left: 20px;
}

/* Collapsed state: one clickable line (small ring, percentage, free space) that opens the details */
.storage-summary {
    display: flex;
    align-items: center;
    gap: 6px 10px;
    width: 100%;
    min-height: 36px;
    padding: 2px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.storage-summary-skeleton {
    min-height: 36px;
}

.storage-summary .storage-ring .mud-progress-circular {
    width: 24px !important;
    height: 24px !important;
}

.storage-summary-title {
    flex: none;
}

.storage-summary-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storage-summary-toggle {
    margin-left: auto;
    flex: none;
    font-size: 0.875rem;
    color: var(--mud-palette-primary);
}

.storage-chevron {
    flex: none;
    color: var(--mud-palette-primary);
    transition: transform .2s ease;
}

.storage-chevron.open {
    transform: rotate(180deg);
}

/* Phone: the title gives way to the percentage and the free space */
@media (max-width: 600px) {
    .storage-summary-title,
    .storage-summary-total,
    .storage-summary-toggle {
        display: none;
    }
}

/* ---- UI polish: motion, micro-interactions, typography. Only transform/opacity animations (cheap on a phone);
   everything here is switched off with "reduce motion" in the OS (block at the end). ---- */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: color-mix(in srgb, var(--mud-palette-primary) 28%, transparent);
}

/* Numbers in tables and counters line up in columns */
.mud-table-cell,
.auction-facts td,
.storage-legend,
.storage-ring-label,
.job-indicator {
    font-variant-numeric: tabular-nums;
}

.page-header-title {
    font-weight: 500;
    letter-spacing: -.01em;
}

/* A new page rises in softly: every top-level block of the page, the next ones a moment later */
.page-body > * {
    animation: page-in .3s cubic-bezier(.2, .8, .2, 1) backwards;
}

.page-body > :nth-child(2) {
    animation-delay: .04s;
}

.page-body > :nth-child(n + 3) {
    animation-delay: .08s;
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* К1: the first rows of a list appear one after another */
.data-table tbody > tr {
    animation: row-in .25s ease-out backwards;
}

.data-table tbody > tr:nth-child(2) { animation-delay: .02s; }
.data-table tbody > tr:nth-child(3) { animation-delay: .04s; }
.data-table tbody > tr:nth-child(4) { animation-delay: .06s; }
.data-table tbody > tr:nth-child(5) { animation-delay: .08s; }
.data-table tbody > tr:nth-child(6) { animation-delay: .1s; }
.data-table tbody > tr:nth-child(7) { animation-delay: .12s; }
.data-table tbody > tr:nth-child(n + 8) { animation-delay: .14s; }

@keyframes row-in {
    from {
        opacity: 0;
    }
}

/* Buttons give a little under the finger or the mouse */
.mud-button-root {
    transition-property: background-color, box-shadow, border-color, color, transform;
}

.mud-button-root:not(:disabled):active {
    transform: scale(.96);
}

/* Side menu: rounded items with a bar on the left of the open section */
.mud-drawer .mud-nav-link {
    margin: 1px 8px 1px 0;
    border-radius: 0 999px 999px 0;
    transition: background-color .15s, color .15s;
}

.mud-drawer .mud-nav-link.active {
    box-shadow: inset 3px 0 0 var(--mud-palette-primary);
    font-weight: 500;
}

.mud-drawer .mud-nav-link .mud-nav-link-icon {
    transition: transform .15s ease-out;
}

.mud-drawer .mud-nav-link:hover .mud-nav-link-icon {
    transform: scale(1.12);
}

/* EmptyState: the icon in a soft circle of the primary colour, popping in once */
.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 50%;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    animation: empty-pop .45s cubic-bezier(.3, 1.4, .5, 1) backwards;
}

.empty-state .mud-typography-subtitle1 {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

@keyframes empty-pop {
    from {
        opacity: 0;
        transform: scale(.6);
    }
}

/* К2: the photo of a tile comes a little closer on hover (the tile itself keeps still for SortableJS) */
.lot-tile-image img {
    transition: transform .25s ease-out;
}

.lot-tile:hover .lot-tile-image img {
    transform: scale(1.04);
}

/* "Аукцион": the current status breathes */
.auction-step-current .mud-icon-root {
    animation: step-pulse 2s ease-in-out infinite;
}

@keyframes step-pulse {
    50% {
        transform: scale(1.18);
    }
}

/* Disk usage bar fills from the left on load */
.storage-bar {
    animation: bar-grow .8s cubic-bezier(.2, .8, .2, 1) backwards;
}

@keyframes bar-grow {
    from {
        clip-path: inset(0 100% 0 0 round 7px);
    }

    to {
        clip-path: inset(0 0 0 0 round 7px);
    }
}

/* Activity bar: a light streak running along the top edge of the header while the server works */
.activity-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
    z-index: calc(var(--mud-zindex-appbar) + 1);
    opacity: 0;
    transition: opacity .25s;
}

.activity-bar.visible {
    opacity: 1;
}

.activity-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--mud-palette-appbar-text), transparent);
    animation: activity-run 1.1s ease-in-out infinite;
    animation-play-state: paused;
}

.activity-bar.visible span {
    animation-play-state: running;
}

@keyframes activity-run {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(250%);
    }
}

/* Confetti canvas (ui.js celebrate) */
.celebrate-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
}

/* Keys in hints */
kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 6px;
    border: 1px solid var(--mud-palette-lines-default);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-primary);
    font: 500 .75rem/1.6 Consolas, "Cascadia Mono", monospace;
    text-align: center;
}

kbd + kbd {
    margin-left: 4px;
}

.shortcut-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: center;
    margin: 4px 0 12px;
}

.shortcut-list dt {
    white-space: nowrap;
}

.shortcut-list dd {
    margin: 0;
}

/* Header user menu: section caption and the current theme */
.user-menu-section {
    font-size: .75rem !important;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.user-menu-current {
    font-weight: 500;
}

/* Command palette (Ctrl+K) */
.command-palette.mud-dialog {
    margin-top: 10vh;
    overflow: hidden;
}

.command-palette-search {
    padding: 8px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.command-palette-search input {
    font-size: 1.05rem;
}

.command-palette-list {
    max-height: min(420px, 55vh);
    overflow-y: auto;
    padding: 4px 0 8px;
}

.command-palette-group {
    padding: 10px 20px 4px;
    font-size: .7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mud-palette-text-secondary);
}

.command-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 8px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--mud-palette-text-primary);
}

.command-palette-item .mud-icon-root {
    color: var(--mud-palette-text-secondary);
}

.command-palette-item.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.command-palette-item.active .mud-icon-root {
    color: var(--mud-palette-primary);
}

.command-palette-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-palette-hint {
    flex: none;
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

.command-palette-footer {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

@media (max-width: 700px) {
    .command-palette-footer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-body > *,
    .data-table tbody > tr,
    .empty-state-icon,
    .auction-step-current .mud-icon-root,
    .storage-bar {
        animation: none;
    }

    .mud-button-root:not(:disabled):active,
    .lot-tile:hover .lot-tile-image img,
    .mud-drawer .mud-nav-link:hover .mud-nav-link-icon {
        transform: none;
    }

    .activity-bar span {
        width: 100%;
        animation: none;
        opacity: .6;
    }
}
