/* Font stack with CJK fallbacks so Chinese renders properly on Windows, macOS and Linux. */
:root {
    --sm-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
        "WenQuanYi Micro Hei", sans-serif;
}

body {
    font-family: var(--sm-font-sans);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #0d6efd;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
    text-transform: uppercase;
}

/* Auth pages */
.guest-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.guest-card-wrap {
    width: 100%;
    max-width: 27rem;
}

/* Stat tiles */
.stat-tile {
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    height: 100%;
}

.stat-tile .stat-label {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.25rem;
}

.stat-tile .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Item table */
.item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
}

.item-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.1;
    padding: 0.25rem;
}

.table-items > :not(caption) > * > * {
    vertical-align: middle;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sort-link:hover {
    text-decoration: underline;
}

.sort-link .sort-arrow {
    opacity: 0.55;
    font-size: 0.75em;
}

/* Modal image preview */
.image-preview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
}

.empty-state {
    padding: 3.5rem 1rem;
    text-align: center;
}

/* Profile page */
.profile-shell {
    max-width: 42rem;
}
