﻿html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* 表格沿用样板占满容器，长内容在单元格内换行。 */
.mud-table-root,
.mud-simple-table table {
    width: 100%;
    max-width: 100%;
}

.mud-table-root .mud-table-cell,
.mud-simple-table th,
.mud-simple-table td {
    box-sizing: border-box;
    max-width: 420px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mud-table-root .mud-table-cell .d-flex > div,
.mud-simple-table td .d-flex > div,
.mud-table-root .column-header,
.mud-table-root .column-header .column-header-content {
    min-width: 0;
}

.name-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-width: min(100%, 450px);
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.validation-message {
    color: var(--mud-palette-error);
    font-size: var(--mud-typography-caption-size);
}

.product-title {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.product-title:not(:disabled):hover {
    text-decoration: underline;
}

.product-title:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.product-title:disabled {
    cursor: default;
}

.quantity-input {
    width: 96px;
    max-width: 100%;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 80px;
    padding: 8px 0;
}

.avatar-upload-info {
    min-width: 0;
}

.avatar-upload-help {
    color: var(--mud-palette-text-secondary);
}

.app-loading {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #475569;
}

.app-loading__spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e1ff;
    border-top-color: #594AE2;
    border-radius: 50%;
    animation: app-loading-spin 0.8s linear infinite;
}

.login-page {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background-color: #6610f2;
    background-image: linear-gradient(180deg, #6610f2 10%, #4f0cc8 100%);
}

.login-page .login-input .mud-input-filled {
    background-color: #fff;
}

.login-page .login-input .mud-input-slot {
    color: #1f2937;
}

.login-page .login-footer {
    color: #fff;
}
.captcha-image {
    width: 120px;
    height: 40px;
    cursor: pointer;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #fff4ce;
    color: #222;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

@keyframes app-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-height: 640px) {
    .login-page {
        align-items: flex-start;
    }
}
