:root {
    --auction-accent: #1f4f8f;
    --auction-accent-soft: rgba(31, 79, 143, 0.1);
    --auction-sidebar: #253247;
    --auction-sidebar-border: rgba(255, 255, 255, 0.08);
    --auction-sidebar-text: rgba(255, 255, 255, 0.84);
}

html,
body {
    min-height: 100%;
}

body {
    background: #f4f6f9;
    color: #1f2d3d;
}

a {
    text-decoration: none;
}

.app-header {
    border-bottom: 1px solid rgba(31, 45, 61, 0.08);
}

.app-header .nav-link {
    color: #4b5563;
}

.header-badge {
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.sidebar-toggle-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--auction-sidebar) 0%, #1f2a3b 100%);
    border-right: 0;
}

.app-sidebar .brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: auto;
    padding: 1rem;
    border-bottom: 1px solid var(--auction-sidebar-border);
}

.app-sidebar .brand-image {
    float: none;
    max-height: 2rem;
    margin: 0;
}

.app-sidebar .brand-text {
    font-size: 1rem;
    font-weight: 600;
}

.app-sidebar .sidebar-wrapper {
    padding: 0.75rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 1rem;
    color: var(--auction-sidebar-text);
}

.sidebar-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

.sidebar-user__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-user__meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.75rem;
    color: var(--auction-sidebar-text);
    padding: 0.75rem 0.85rem;
}

.nav-sidebar .nav-link p {
    margin: 0;
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link.active {
    color: #fff;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.nav-icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.language-switch {
    display: inline-flex;
    gap: 0.35rem;
}

.language-switch .btn {
    min-width: 2.85rem;
}

.language-switch .btn.active {
    background: var(--auction-accent);
    border-color: var(--auction-accent);
    color: #fff;
}

.page-shell {
    display: grid;
    gap: 1rem;
}

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

.page-title-group h1,
.page-title-group h2 {
    margin: 0;
    font-weight: 600;
}

.page-kicker {
    margin-bottom: 0.35rem;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-subtitle {
    margin: 0;
    color: #6c757d;
}

.card-tools-inline,
.page-counts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.small-box {
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-title {
    font-weight: 600;
}

.empty-placeholder {
    display: grid;
    place-items: center;
    min-height: 8rem;
    padding: 1.5rem;
    border: 1px dashed rgba(108, 117, 125, 0.35);
    border-radius: 0.75rem;
    background: rgba(248, 249, 250, 0.9);
    color: #6c757d;
    text-align: center;
}

.admin-list {
    display: grid;
    gap: 1rem;
}

.admin-list__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(33, 37, 41, 0.08);
}

.admin-list__item:first-child {
    padding-top: 0;
    border-top: 0;
}

.item-title {
    font-weight: 600;
    color: #1f2d3d;
}

.table-meta {
    color: #6c757d;
    font-size: 0.875rem;
}

.value-stack {
    display: grid;
    gap: 0.15rem;
}

.value-main {
    font-weight: 600;
    color: #1f2d3d;
}

.value-sub {
    color: #6c757d;
    font-size: 0.85rem;
}

.badge--live {
    background: rgba(25, 135, 84, 0.15);
    color: #116239;
}

.badge--scheduled {
    background: rgba(13, 110, 253, 0.14);
    color: #0a58ca;
}

.badge--ended {
    background: rgba(108, 117, 125, 0.16);
    color: #495057;
}

.badge--won {
    background: rgba(111, 66, 193, 0.16);
    color: #5a32a3;
}

.badge--inactive {
    background: rgba(220, 53, 69, 0.15);
    color: #b02a37;
}

.auction-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 18rem;
}

.auction-thumb {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.75rem;
    background: #e9ecef;
    flex-shrink: 0;
}

.auction-title {
    font-weight: 600;
    color: #1f2d3d;
}

.auction-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.35;
}

.details-box {
    margin: 0;
}

.details-box summary {
    cursor: pointer;
    color: var(--auction-accent);
    font-weight: 600;
}

.details-box[open] summary {
    margin-bottom: 0.75rem;
}

.details-box pre {
    margin: 0;
    max-height: 16rem;
    overflow: auto;
    padding: 0.9rem;
    border: 1px solid rgba(33, 37, 41, 0.08);
    border-radius: 0.75rem;
    background: #f8f9fa;
    color: #495057;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.auction-textarea {
    min-height: 10rem;
}

.category-picker {
    position: relative;
}

.category-picker::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid #6c757d;
    border-bottom: 2px solid #6c757d;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.category-picker__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.75rem;
    border-color: rgba(31, 45, 61, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.category-picker__select:focus {
    border-color: rgba(31, 79, 143, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(31, 79, 143, 0.12);
}

.status-list {
    display: grid;
    gap: 0.75rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(33, 37, 41, 0.08);
}

.status-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.winner-panel {
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: rgba(31, 79, 143, 0.08);
}

.winner-panel__label {
    color: #6c757d;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.winner-panel__name {
    font-weight: 600;
    margin-top: 0.25rem;
}

.winner-panel__amount {
    margin-top: 0.25rem;
    color: var(--auction-accent);
    font-weight: 700;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
}

.image-card {
    overflow: hidden;
    border: 1px solid rgba(33, 37, 41, 0.08);
    border-radius: 0.75rem;
    background: #fff;
}

.image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.image-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
}

.image-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.inventory-image-list {
    display: grid;
    gap: 1rem;
}

.inventory-image-row {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid rgba(33, 37, 41, 0.08);
    border-radius: 0.75rem;
    background: #fff;
}

.inventory-preview {
    display: grid;
    place-items: center;
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.78rem;
    text-align: center;
}

.inventory-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inventory-image-editor {
    min-width: 0;
}

.login-page {
    background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
}

.login-box {
    width: 420px;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #1f2d3d;
    font-size: 1.1rem;
    font-weight: 700;
}

.login-brand img {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.8rem;
}

.login-language {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1rem;
}

.support-message-text {
    white-space: pre-wrap;
    word-break: break-word;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 991.98px) {
    .page-toolbar,
    .admin-list__item {
        align-items: stretch;
    }

    .auction-cell {
        min-width: 14rem;
    }

    .inventory-image-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .login-box {
        width: 92%;
    }

    .auction-cell {
        flex-direction: column;
    }
}
