/**
 * @Author zF.
 * @ProjectName shangguai-framework
 * @Description 全局样式表 - 提供前后台公共界面样式
 */

/* ==================== 基础样式 ==================== */

/* Remix Icon 字体 - 图标始终可见，依赖浏览器字体缓存 */

/* 页面淡入：真实内容就绪后移除 admin-loading，保留轻量过渡 */
body.page-transition{transition:opacity .2s ease;}

body.admin-loading .admin-content > :not(#page-skeleton) {
    visibility: hidden;
}

html.sg-modal-restore-pending body.admin-loading #page-skeleton {
    visibility: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

html,
body,
body * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img,
svg,
canvas,
video {
    -webkit-user-drag: none;
    user-drag: none;
}

input,
textarea,
select,
option,
[contenteditable=""],
[contenteditable="true"],
[contenteditable="true"] *,
[contenteditable="plaintext-only"],
[contenteditable="plaintext-only"] *,
pre,
pre *,
code,
code *,
kbd,
samp,
.u-select-text,
.u-select-text *,
[data-selectable],
[data-selectable] * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

textarea {
    resize: vertical !important;
    min-height: var(--sg-textarea-default-height);
    max-height: var(--sg-textarea-max-height);
    max-width: 100%;
    overflow-y: auto;
}

img {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

@media (min-width: 769px) {
    table {
        display: table;
    }
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    color: #1890ff;
}

[data-href],
a[role="button"] {
    cursor: pointer;
}

.app-logo-icon {
    display: block;
    width: 24px;
    height: 24px;
    background: #fff;
    -webkit-mask: url('/assets/img/logo.svg') center / contain no-repeat;
    mask: url('/assets/img/logo.svg') center / contain no-repeat;
}

.app-logo-img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* 响应式辅助类 */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* ==================== 通用组件 ==================== */

.form-group {
    margin-bottom: var(--admin-form-gap, 18px);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #373151;
    margin-bottom: var(--admin-label-gap, 8px);
    letter-spacing: 0.3px;
}

.form-group label:has(input[type="checkbox"]),
.form-group label:has(input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="search"],
.form-group select {
    width: 100%;
    padding: 0 13px;
    height: 39px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    line-height: 39px;
}

.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    line-height: 1.5;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group input[type="url"]::placeholder,
.form-group input[type="search"]::placeholder,
.form-group textarea::placeholder {
    color: #c4c9d4;
    font-weight: 400;
}

.form-group input[type="text"]:hover,
.form-group input[type="number"]:hover,
.form-group input[type="password"]:hover,
.form-group input[type="email"]:hover,
.form-group input[type="tel"]:hover,
.form-group input[type="url"]:hover,
.form-group input[type="date"]:hover,
.form-group input[type="datetime-local"]:hover,
.form-group input[type="search"]:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #d1d5db; }

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group input[type="search"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background-color: #f3f5f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    margin-right: 6px;
    vertical-align: middle;
}

.modal-body .form-group .checkbox-label,
.form-group .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #373151;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f5f6;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.15s;
    line-height: 1.4;
}

.modal-body .form-group .checkbox-label:hover,
.form-group .checkbox-label:hover {
    background: #ebebeb;
}

.modal-body .form-group input[type="checkbox"],
.form-group .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 36px;
    min-width: 36px;
    height: 20px;
    border-radius: 20px;
    background: #d1d5db;
    border: none;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 0;
    transition: background 0.2s;
    margin: 0;
}

.modal-body .form-group input[type="checkbox"]::after,
.form-group .checkbox-label input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: left 0.2s;
}

.modal-body .form-group input[type="checkbox"]:checked,
.form-group .checkbox-label input[type="checkbox"]:checked {
    background: #3b82f6;
}

.modal-body .form-group input[type="checkbox"]:checked::after,
.form-group .checkbox-label input[type="checkbox"]:checked::after {
    left: 18px;
}

.hint {
    margin-top: 5px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.5;
}

/* ==================== 全局标签字段 ==================== */
input[name="tags"].pf-tag-input:not([data-tag-editor-enhanced]),
input[data-tag-editor]:not([data-tag-editor-enhanced]) {
    visibility: hidden;
}

.pf-tag-editor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    width: 100%;
    min-height: 39px;
    padding: 4px 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    cursor: text;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-tag-editor:hover { border-color: #d1d5db; }
.pf-tag-editor:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
}
.pf-tag-editor-input {
    flex: 1 1 36px;
    width: auto !important;
    min-width: 0;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 28px !important;
    outline: none;
}
.pf-tag-editor-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(100%, 240px);
    height: 28px;
    padding: 0 10px 0 12px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    line-height: 28px;
}
.pf-tag-editor-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-tag-editor-chip-remove {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #2563eb;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    opacity: 0.88;
    transition: all 0.15s ease;
}
.pf-tag-editor-chip-remove::before {
    content: "\00D7";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: currentColor;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.pf-tag-editor-chip-remove:hover {
    background: #dbeafe;
    opacity: 1;
}

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    padding: 24px 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.login-page [class^="ri-"],
.login-page [class*=" ri-"] {
    visibility: visible;
}

.login-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    margin: auto 0;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    width: 100%;
    box-sizing: border-box;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #0f172a;
    letter-spacing: 0;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #0f172a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.3);
}

.login-logo svg,
.login-logo [class^="ri-"],
.login-logo [class*=" ri-"],
.login-logo .app-logo-icon,
.login-logo .app-logo-img {
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 32px;
    line-height: 1;
}

.login-subtitle {
    text-align: center;
    color: #65758b;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333135;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fff;
    color: #0f172a;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus,
.login-form select:focus {
    border-color: #0f172a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
    outline: none;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #95A3B8;
}

/* 覆盖浏览器自动填充样式 */
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    background-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-form .pf-btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    border: none;
    margin-top: 12px;
    transition: all 0.2s ease;
    letter-spacing: 0;
}

.login-form .pf-btn-primary:hover {
    background: #1e293b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

.login-form .pf-btn-primary:focus,
.login-form .pf-btn-primary:active {
    color: #fff;
}

.login-form .pf-btn-primary:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: #65758B;
    font-size: 14px;
}

.login-footer a {
    color: #0f172a;
    font-weight: 600;
}

.login-footer a:hover {
    color: #333135;
}

.login-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin-top: 32px;
}
.login-copyright a,
.login-copyright a:hover,
.login-copyright a:focus,
.login-copyright a:active {
    color: inherit;
    text-decoration: none;
    outline: none;
}

.login-box .login-copyright {
    margin-top: 16px;
    color: rgba(100, 116, 139, 0.88);
    font-size: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px 16px 8px;
}
.pagination .page-btn,
.pagination .page-num {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #373151;
    background: #fff;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
}
.pagination .page-btn:hover,
.pagination .page-num:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}
.pagination .page-num.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 600;
}

/* ==================== 后台管理页面 ==================== */
.admin-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-page.layout-admin-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(to right, #001529 220px, #f5f5f5 220px);
}
.admin-page.layout-admin-shell .admin-nav {
    background: #001529;
}

.admin-content {
    flex: 1 0 auto;
    min-height: calc(100vh - 106px);
    margin-left: 220px;
    margin-top: 56px;
    padding: 25px 28px 15px;
    background: #f5f5f5;
    box-sizing: border-box;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}

.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav {
    width: 220px;
    background: #001529;
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.nav-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.nav-brand a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 12px 20px;
}

.nav-menu {
    list-style: none;
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s;
    gap: 12px;
}

.nav-menu li a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-menu li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-menu li.active a {
    color: #fff;
    background: #1890ff;
}

.nav-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.nav-link-front {
    appearance: none;
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    box-sizing: border-box;
    color: #fff;
    background: rgba(24, 144, 255, 0.15);
    border: 1px solid rgba(24, 144, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

.nav-link-front:hover {
    background: rgba(24, 144, 255, 0.25);
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.nav-link {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    display: block;
}

/* 移动端底部菜单 */
.nav-mobile-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* PC端顶部栏 */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
}

.topbar-left {
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
}

/* 管理员下拉菜单 */
.admin-dropdown {
    position: relative;
}

.admin-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-dropdown-toggle:hover {
    border-color: #d9d9d9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
}

.admin-avatar .app-logo-icon {
    width: 20px;
    height: 20px;
}

.admin-avatar-logo {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* 真实用户头像：去 logo 白化滤镜，圆形铺满容器 */
.admin-avatar-logo.is-avatar,
.admin-avatar .is-avatar {
    filter: none;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.admin-name {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}


.nav-dropdown-icon {
    font-size: 16px;
    color: #95A3B8;
    margin-left: 2px;
    transition: transform .2s;
}

.admin-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 168px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    z-index: 1200;
}

.admin-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    box-sizing: border-box;
    color: #1e293b;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
}

.dropdown-item:hover {
    color: #2563eb;
    background: #eff6ff;
}

.dropdown-item-danger {
    color: #dc2626;
}

.dropdown-item-danger:hover {
    color: #dc2626;
    background: #fee2e2;
}

.dropdown-divider {
    height: 1px;
    margin: 6px 4px;
    background: #e5e7eb;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* 筛选表单 */
.filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form .stats-row {
    margin-bottom: 0;
    flex-shrink: 0;
}

.filter-inputs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-form input,
.filter-form select {
    padding: 0 13px;
    height: 39px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: #373151;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.08);
}

.filter-form input {
    width: 180px;
}

.filter-form input.filter-search-input {
    width: 320px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-inputs {
        flex-direction: column;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
        box-sizing: border-box;
    }

    .filter-buttons {
        justify-content: flex-end;
    }
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: var(--admin-form-gap, 18px);
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* 系统设置开关横向网格（一行 4 个，窄屏降列） */
.settings-toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 18px;
}

.settings-toggle-item .hint {
    margin: 8px 0 0;
}

@media (max-width: 1100px) {
    .settings-toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .settings-toggle-grid {
        grid-template-columns: 1fr;
    }
}

/* 响应式设计 */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    
    
    .admin-content {
        padding: 20px;
    }
}

/* 手机设备 (最大 768px) */
@media (max-width: 768px) {
    /* 后台导航 - 移动端顶部横向布局 */
    .admin-nav {
        width: 100% !important;
        height: 56px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
        padding: 0 !important;
    }
    
    /* 品牌标题 */
    .nav-brand {
        flex: 1 !important;
        border: none !important;
        padding: 16px !important;
        order: 1 !important;
    }
    
    .nav-brand a {
        font-size: 14px !important;
        white-space: nowrap;
    }
    
    /* 菜单切换按钮 */
    .nav-toggle {
        display: block !important;
        order: 2 !important;
        flex-shrink: 0 !important;
        padding: 16px !important;
    }
    
    /* 隐藏PC端的顶部栏和底部 */
    .admin-topbar,
    .nav-footer {
        display: none !important;
    }
    
    /* 菜单列表 - 默认隐藏，点击后从顶部下拉，覆盖在内容上方 */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 56px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #001529 !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: calc(100vh - 56px) !important;
        overflow-y: auto !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 999 !important;
    }
    
    .nav-menu.show {
        display: flex !important;
    }

    .nav-menu li {
        width: 100% !important;
        display: block !important;
    }

    .nav-menu li a {
        display: block !important;
        width: 100% !important;
        padding: 14px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s;
        text-align: center;
        font-size: 18px;
    }

    .nav-menu li a i {
        display: none;
    }

    .nav-menu li a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-menu li.active a {
        background: #1890ff;
    }

    /* 移动端底部区域 */
    .nav-mobile-footer {
        background: linear-gradient(180deg, #001529 0%, #000c17 100%) !important;
        padding: 0 !important;
        margin-top: auto !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* 用户卡片 */
    .mobile-user-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 16px;
        background: rgba(24, 144, 255, 0.06);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #111827;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
    }

    .user-avatar .app-logo-icon {
        width: 22px;
        height: 22px;
    }

    .user-avatar .admin-avatar-logo {
        width: 22px;
        height: 22px;
    }

    .user-details {
        text-align: center;
    }

    .user-name {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
    }

    .user-role {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.5);
    }
    
    /* 操作按钮组 */
    .mobile-actions {
        padding: 6px;
        display: flex;
        flex-direction: row;
        gap: 4px;
    }

    .action-item {
        appearance: none;
        flex: 1;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 3px 2px !important;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 6px !important;
        color: rgba(255, 255, 255, 0.85) !important;
        transition: all 0.3s;
        cursor: pointer;
        font-family: inherit;
        border-bottom: none !important;
        white-space: nowrap;
        font-size: 14px;
    }

    .action-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
        transform: none;
    }

    .action-item svg {
        flex-shrink: 0;
        opacity: 0.85;
        width: 14px;
        height: 14px;
    }

    .action-item span {
        font-size: 14px;
        font-weight: 500;
    }

    .action-item.logout {
        background: rgba(255, 77, 79, 0.1) !important;
        border-color: rgba(255, 77, 79, 0.2) !important;
        color: #ff7875 !important;
    }

    .action-item.logout:hover {
        background: rgba(255, 77, 79, 0.15) !important;
        border-color: rgba(255, 77, 79, 0.3) !important;
    }
    
    /* 菜单遮罩层 */
    .nav-menu {
        display: none;
        width: 100%;
        order: 4;
        position: relative;
        background: #001529;
        padding: 0;
        overflow-y: auto;
        max-height: calc(100vh - 56px);
    }
    
    .nav-menu.show {
        display: block;
    }
    
    .nav-menu li a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 14px 20px;
    }
    
    .nav-footer {
        display: none;
    }

    /* 隐藏PC端顶部栏 */
    .admin-topbar {
        display: none !important;
    }

    .admin-content {
        margin-left: 0 !important;
        margin-top: 56px !important;
        padding: 16px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }

    /* 表单优化 */
    .section-box {
        padding: 16px;
        margin-bottom: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 16px;
        width: 100%;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* 按钮优化 */
    .btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 标题优化 */
    .admin-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .section-box h3 {
        font-size: 16px;
    }
    
    /* 提示文字优化 */
    .hint {
        font-size: 12px;
        word-wrap: break-word;
    }
    
    /* 表单 */
    .form-row {
        flex-direction: column;
        width: 100%;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 表格 */
    .data-table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table thead,
    .data-table tbody,
    .data-table tr {
        display: block;
        width: 100%;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
    }
    
    .data-table th {
        display: none;
    }
    
    .data-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        margin-right: 10px;
    }
    
    .data-table-wrapper {
        width: 100%;
        overflow-x: auto;
    }
    
    /* 按钮 */
    
    
    /* 模态框 */
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    /* 表格头部 */
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* 小屏手机 (最大 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .login-container {
        max-width: 100%;
        padding: 0;
    }
    
    .login-box {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 20px;
    }
    
    .login-header {
        margin-bottom: 28px;
    }

    .login-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .login-logo svg,
    .login-logo [class^="ri-"],
    .login-logo [class*=" ri-"],
    .login-logo .app-logo-icon,
    .login-logo .app-logo-img {
        width: 28px;
        height: 28px;
        font-size: 28px;
    }

    .login-form .form-group {
        margin-bottom: 18px;
    }

    .login-form input[type="text"],
    .login-form input[type="password"],
    .login-form select {
        padding: 13px 16px;
        font-size: 16px;
    }

    .login-form .pf-btn-primary {
        padding: 15px 16px;
        font-size: 15px;
        margin-top: 8px;
    }

    .login-footer {
        margin-top: 22px;
        font-size: 13px;
    }
    
    .admin-content {
        padding: 12px !important;
        margin-top: 56px !important;
    }

    .section-box {
        padding: 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
    }
    
    /* 隐藏不重要的列 */
    .data-table .hide-mobile {
        display: none;
    }
    
    .pagination a,
    .pagination span {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* 横屏手机 */
@media (max-width: 768px) and (orientation: landscape) {
    .admin-nav {
        height: 60px;
    }
    
    .login-page {
        justify-content: flex-start;
        padding: 16px;
    }

    .login-container {
        margin: 0 auto;
    }

    .login-box {
        padding: 28px 24px;
    }

    .login-header {
        margin-bottom: 24px;
    }
}

/* 打印样式 */
@media print {
    .admin-nav,
    .admin-topbar,
    .header,
    .toolbar,
    .btn,
    .pagination {
        display: none;
    }

    .admin-content {
        margin-left: 0;
        margin-top: 0;
    }

    .section-box {
        break-inside: avoid;
    }
}

/* ==================== 响应式工具类 ==================== */

/* 响应式隐藏 */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* 响应式间距 */
@media (max-width: 768px) {

}

/* 响应式宽度 */
@media (max-width: 768px) {
    
}

.site-footer {
    width: min(1080px, calc(100% - 56px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #8a95a6;
    font-size: 13px;
    line-height: 1.5;
}

.site-footer a {
    color: #1890ff;
    margin: 0 8px;
}

.site-footer a:hover {
    color: #1890ff;
}

/* 后台页面页脚 */
.site-footer-admin {
    margin-left: 220px;
    height: 50px;
    background: #e8edf2;
    border-top: 1px solid #d1d9e0;
}

.admin-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
}

.admin-footer-copy {
    font-size: 12px;
    color: #8a95a6;
}

.admin-footer-copy a {
    color: #8a95a6;
    text-decoration: none;
}

.admin-footer-copy a:hover {
    color: #4a5568;
}

.admin-footer-version {
    font-size: 11px;
    color: #a0aab8;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
}

.admin-footer-version:hover,
.admin-footer-version:focus,
.admin-footer-version:active {
    color: #a0aab8;
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

@media (max-width: 768px) {
    .site-footer-admin {
        margin-left: 0;
    }
    .admin-footer-inner {
        padding: 0 16px;
    }
}

/* ==================== 通用按钮（pf-btn） ==================== */
.pf-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.pf-btn i { font-size: 14px; }
.pf-btn-primary { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.pf-btn-primary:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.pf-btn-ghost { background: #fff; color: #373151; border-color: #e5e7eb; }
.pf-btn-ghost:hover { background: #f3f5f6; border-color: #d1d5db; }
.pf-btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.pf-btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.pf-btn-sm { padding: 3px 10px; font-size: 12px; }

/* ==================== 通用模态框 ==================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}
.modal.show { display: flex; }
.modal[data-modal-restored="1"] .modal-content {
    animation: none;
}
.modal-content {
    background: var(--modal-bg, #fff);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    animation: modalIn 0.2s ease;
    scrollbar-width: none;
}
.modal-content::-webkit-scrollbar { display: none; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header-banner {
    position: relative;
    padding: 24px 20px 20px;
    background: var(--modal-bg, #eff6ff);
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}
.modal-header-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 50%, var(--modal-color, #3b82f6) 0%, transparent 60%);
    opacity: 0.15;
}
.modal-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}
.modal-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--modal-color, #3b82f6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    flex-shrink: 0;
}
.modal-header-title { font-size: 16px; font-weight: 600; color: #111827; line-height: 1.3; }
.modal-header-sub   { font-size: 14px; color: #6b7280; margin-top: 4px; font-weight: 600; }
.modal-close-banner {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 2;
    background: rgba(255,255,255,0.8);
    border: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.modal-close-banner:hover { background: #fff; color: #111827; }
.modal-body   { padding: 20px 24px 4px; background: #fff; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f3f5f6; display: flex; justify-content: flex-end; gap: 8px; background: #fff; border-radius: 0 0 16px 16px; }

/* 弹窗颜色主题工具类 */
.modal-theme-blue   { --modal-color: #3b82f6; --modal-bg: #eff6ff; }
.modal-theme-green  { --modal-color: #10b981; --modal-bg: #ecfdf5; }
.modal-theme-amber  { --modal-color: #f59e0b; --modal-bg: #fffbeb; }
.modal-theme-red    { --modal-color: #ef4444; --modal-bg: #fef2f2; }
.modal-theme-indigo { --modal-color: #6366f1; --modal-bg: #eef2ff; }
.modal-theme-purple { --modal-color: #8b5cf6; --modal-bg: #f5f3ff; }
.modal-theme-slate  { --modal-color: #475569; --modal-bg: #f8fafc; }
.modal-theme-cyan   { --modal-color: #0ea5e9; --modal-bg: #ecfeff; }
.modal-theme-ink    { --modal-color: #111827; --modal-bg: #f5f5ff; }

/* ==================== 全局确认弹窗 ==================== */
.sg-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.sg-confirm-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sg-confirm-dialog {
    width: min(310px, calc(100vw - 32px));
    min-height: 122px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.96) translateY(8px);
    transition: opacity 0.16s ease, transform 0.18s ease;
}

.sg-confirm-dialog.ready {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.sg-confirm-header {
    display: grid;
    grid-template-columns: 35px 1fr;
    align-items: center;
    gap: 10px;
    padding: 19px 20px 10px;
}

.sg-confirm-header > div:not(.sg-confirm-icon) {
    display: contents;
}

.sg-confirm-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sg-dialog-icon-bg, #fef3c7);
    color: var(--sg-dialog-color, #f59e0b);
    font-size: 16px;
}

.sg-confirm-title {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
}

.sg-confirm-message {
    grid-column: 1 / -1;
    color: #65758b;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    margin-top: 7px;
    white-space: pre-line;
    word-break: break-word;
    max-width: 232px;
}

.sg-confirm-input {
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 12px;
    padding: 0 12px;
    color: #111827;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 40px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sg-confirm-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.sg-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    padding: 11px 20px 19px;
    background: #fff;
}

.sg-confirm-footer .pf-btn {
    min-width: 62px;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.sg-confirm-footer .sg-confirm-cancel {
    background: #fff;
    color: #373151;
    border: 1.5px solid #e5e7eb;
}

.sg-confirm-footer .sg-confirm-cancel:hover {
    background: #f8fafc;
    color: #111827;
    border-color: #d1d5db;
}

.sg-confirm-footer .sg-confirm-ok {
    background: var(--sg-dialog-color, #f59e0b);
    color: #fff;
    border-color: var(--sg-dialog-color, #f59e0b);
}

.sg-confirm-footer .sg-confirm-ok:hover {
    background: var(--sg-dialog-hover-color, #d97706);
    border-color: var(--sg-dialog-hover-color, #d97706);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--sg-dialog-color, #f59e0b) 22%, transparent);
}

@media (max-width: 560px) {
    .sg-confirm-dialog {
        width: calc(100vw - 32px);
        min-height: 0;
        border-radius: 14px;
    }

    .sg-confirm-header {
        gap: 10px;
        padding: 19px 20px 10px;
    }

    .sg-confirm-icon {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        font-size: 16px;
    }

    .sg-confirm-title {
        font-size: 14px;
        margin-top: 0;
    }

    .sg-confirm-message {
        font-size: 12px;
        margin-top: 7px;
    }

    .sg-confirm-footer {
        gap: 7px;
        padding: 11px 20px 19px;
    }

    .sg-confirm-footer .pf-btn {
        min-width: 62px;
        padding: 9px 15px;
        font-size: 12px;
    }
}

/* 全局 .form-group 样式已与弹窗风格统一，此处仅保留弹窗专属覆盖 */
.modal-body .form-group { margin-bottom: var(--admin-form-gap, 18px); }
.modal-body .form-group label:first-child {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #373151;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.modal-body .form-group input[type="text"],
.modal-body .form-group input[type="number"],
.modal-body .form-group textarea,
.modal-body .form-group select {
    font-size: 14px;
}
.modal-body .form-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 5px;
    line-height: 1.5;
}

/* ==================== 自定义下拉（custom-select） ==================== */
.custom-select { position: relative; min-width: 120px; }
.filter-custom-select { min-width: 140px; }
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    height: 39px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.custom-select-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-select-trigger:hover { border-color: #d1d5db; }
.custom-select.open .custom-select-trigger { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.10); }
.custom-select-arrow { font-size: 18px; color: #9ca3af; transition: transform 0.2s; flex-shrink: 0; }
.custom-select.open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    width: max-content;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 1000;
    overflow-y: auto;
    max-height: 260px;
    scrollbar-width: none;
    padding: 3px;
}
.custom-select.open .custom-select-dropdown { display: block; }
.custom-select-dropdown::-webkit-scrollbar { display: none; }
.custom-select-option { padding: 7px 12px; margin: 3px 0; font-size: 14px; color: #373151; border-radius: 7px; cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; }
.custom-select-option:hover { background: #f3f5f6; }
.custom-select-option.active { background: #eff6ff; color: #2563eb; font-weight: 600; }

/* 移动端模态框底部弹出 */
@media (max-width: 640px) {
    .modal { align-items: flex-end; padding: 0; }
    .modal-content {
        width: 100%; max-width: 100%; max-height: 88vh;
        border-radius: 20px 20px 0 0;
        animation: modalInMobile 0.25s ease;
        display: flex; flex-direction: column;
    }
    .modal-content::before {
        content: '';
        display: block;
        width: 36px; height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        margin: 10px auto 0;
        flex-shrink: 0;
    }
    @keyframes modalInMobile {
        from { opacity: 0; transform: translateY(60px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .modal-header-banner { border-radius: 0; padding: 16px 16px 14px; flex-shrink: 0; }
    .modal-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
    .modal-footer {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        flex-shrink: 0; flex-direction: column; gap: 8px;
    }
    .modal-footer .pf-btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
}


/* ==================== 统计卡片（stats-row / stat-card） ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}
.stats-row.stats-row--auto {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}
.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon-success { background: #dcfce7; color: #16a35a; }
.stat-icon-info { background: #eff6ff; color: #2563eb; }
.stat-icon-primary { background: #eef2ff; color: #5f56e5; }
.stat-icon-warn { background: #fef3c7; color: #d97706; }

.stat-value { font-size: 22px; font-weight: 700; color: #111827; line-height: 1.2; }
.stat-label { font-size: 12px; color: #9ca3af; margin-top: 3px; }
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stats-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .stats-row.stats-row--auto { grid-template-columns: 1fr; } }

/* ==================== 内容区块（section-box / section-header） ==================== */
.section-box {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: var(--admin-stack-gap, 24px);
}
.admin-content > :where(.section-box, .stats-row):not(:has(~ :where(.section-box, .stats-row, form))),
.admin-content > form:not(:has(~ :where(.section-box, .stats-row, form))) > .section-box:last-of-type {
    margin-bottom: 0;
}
.section-box > h3,
.section-box > h4 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--admin-form-gap, 18px);
}
.section-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #111827; }

/* ==================== 数据表格（data-table） ==================== */
.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead th {
    padding: 13px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    background: #1e293b;
    border-bottom: none;
}
.data-table th.hide-mobile,
.data-table td.hide-mobile {
    display: table-cell;
}
.data-table thead th:first-child { border-radius: 9px 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 9px 0 0; }
.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s, box-shadow 0.12s;
    height: 52px;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover {
    background: #eff6ff;
    box-shadow: inset 3px 0 0 #3b82f6;
}
.data-table tbody tr.table-pad-row {
    background: transparent !important;
}
.data-table tbody tr.table-pad-row:hover {
    background: transparent;
    box-shadow: none;
    cursor: default;
}
.data-table tbody tr.table-pad-row td {
    color: transparent;
}
.data-table tbody td {
    padding: 0 16px;
    height: 52px;
    color: #1e293b;
    font-size: 14px;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}
.data-table code {
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    letter-spacing: .3px;
}

/* 长文本列限宽省略：防止 nowrap 内容撑爆表格导致操作列被压缩换行 */
.data-table td.td-clip {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td.td-clip-sm {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 数据表格内表单控件继承全局样式 */
.data-table td input[type="text"],
.data-table td input[type="number"],
.data-table td input[type="date"],
.data-table td select,
.data-table td textarea {
    width: 100%;
    padding: 0 10px;
    height: 34px;
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 34px;
}
.data-table td textarea {
    height: auto;
    line-height: 1.5;
    padding: 6px 10px;
}
.data-table td input:focus,
.data-table td select:focus,
.data-table td textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
}
.data-table td .custom-select {
    width: 100%;
    min-width: 100%;
}

.data-table tbody td.table-empty-cell {
    height: calc(52px * 10);
    text-align: center;
    padding: 0 20px !important;
    pointer-events: none;
    border: none !important;
    background: transparent !important;
    vertical-align: middle;
}

.table-empty-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.table-empty-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #f0f4ff;
    border: 1.5px dashed #c7d7fd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-empty-icon {
    font-size: 30px;
    color: #93aef5;
    line-height: 1;
}

.table-empty-text {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.3px;
}

.table-empty-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: -4px;
}

/* 移动端保持横向滚动，不转卡片 */
@media (max-width: 768px) {
    .data-table-wrapper { overflow-x: auto; }
    .data-table { display: table; width: max-content; min-width: 100%; font-size: 12px; }
    .data-table thead,
    .data-table tbody,
    .data-table tr  { display: table-row-group; }
    .data-table thead { display: table-header-group; }
    .data-table tr  { display: table-row; }
    .data-table th,
    .data-table td  { display: table-cell; padding: 0 10px; height: 48px; white-space: nowrap; }
    .data-table td::before { display: none; }
}

/* 数据表格溢出时允许横向滚动，避免右侧操作列被裁切不可达 */
.data-table-wrapper {
    overflow-x: auto;
}

/* ==================== 状态徽标 ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.badge-success   { background: #dcfce7; color: #15803d; }
.badge-danger    { background: #fee2e2; color: #dc2626; }
.badge-warning   { background: #fef3c7; color: #a16207; }
.badge-orange    { background: #ffedd5; color: #c2410c; }
.badge-secondary { background: #f3f5f6; color: #6b7280; }
.badge-primary   { background: #dbeafe; color: #1d4ed8; }

.pf-tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}
.pf-tag-chip,
.pf-tag-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.pf-tag-chip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}
.pf-tag-more {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.pf-tag-empty {
    color: #94a3b8;
    font-size: 12px;
}

/* ==================== 文字颜色工具类 ==================== */

/* 禁用下拉统一置灰样式 */
select[disabled],
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f3f5f6;
    color: #9ca3af;
    pointer-events: none;
}

/* 内容区块内独占一行的表单项默认占半宽 */
.section-box > .form-group { width: 50%; }
.section-box > .form-group .checkbox-label { width: 100%; }

/* ==================== 简单模态框头部（modal-header / modal-close） ==================== */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f5f6;
}
.modal-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #111827; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 0;
}
.modal-close:hover { color: #373151; }
/* ==================== 文件选择器美化 ==================== */
/* ==================== 骨架屏 ==================== */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes sg-page-spin {
    to { transform: rotate(360deg); }
}

#sg-page-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #f5f5f5;
    pointer-events: none;
}

#sg-page-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#sg-page-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(24, 144, 255, .15);
    border-top-color: #1890ff;
    animation: sg-page-spin .7s linear infinite;
    margin-left: 220px;
    box-shadow: 0 0 0 1px rgba(24, 144, 255, .08);
}

@media (max-width: 768px) {
    #sg-page-spinner { margin-left: 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e8eaed 25%, #f3f5f6 50%, #e8eaed 75%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
    display: block;
}

/* 骨架屏容器：页面内容区占位 */
.skeleton-page {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 页面标题行 */
.skeleton-title   { height: 28px; width: 160px; }
.skeleton-subtitle { height: 16px; width: 260px; margin-top: 6px; }

/* 卡片网格 */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.skeleton-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}
.skeleton-card-header { height: 92px; }
.skeleton-card-body   { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-card-line-a { height: 16px; width: 70%; }
.skeleton-card-line-b { height: 12px; width: 50%; }
.skeleton-card-line-c { height: 12px; width: 85%; }
.skeleton-card-footer { height: 44px; border-top: 1px solid #f3f5f6; background: #fafafa; }

/* 表格骨架 */
.skeleton-table { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
.skeleton-table-header { height: 48px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.skeleton-table-row    { height: 48px; border-bottom: 1px solid #f3f5f6; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.skeleton-table-row:last-child { border-bottom: none; }
.skeleton-col-sm  { height: 14px; flex: 0 0 80px; }
.skeleton-col-md  { height: 14px; flex: 0 0 140px; }
.skeleton-col-lg  { height: 14px; flex: 1; }
.skeleton-col-xs  { height: 14px; flex: 0 0 50px; }

/* 工具栏骨架 */
.skeleton-toolbar { display: flex; gap: 10px; align-items: center; }
.skeleton-btn     { height: 36px; border-radius: 8px; flex: 0 0 90px; }
.skeleton-search  { height: 36px; border-radius: 8px; flex: 0 0 200px; }
.skeleton-select  { height: 36px; border-radius: 8px; flex: 0 0 120px; }

@media (max-width: 1100px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .skeleton-grid { grid-template-columns: 1fr; } }

/* ==================== 通用工具类（优先替代内联 style） ==================== */
.u-hidden { display: none !important; }
.u-inline-block { display: inline-block !important; }
.u-spin-08 { animation: spin .8s linear infinite; }
.u-flex { display: flex !important; }
.u-items-center { align-items: center; }
.u-gap-8 { gap: 8px; }
.u-flex-1 { flex: 1; }
.u-shrink-0 { flex-shrink: 0; }
.u-w-quarter { width: 25%; }
.u-min-w-0 { min-width: 0; }
.u-min-w-320 { min-width: 320px; }
.u-max-w-420 { max-width: 420px; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-12 { margin-top: 12px; }
.u-ml-auto { margin-left: auto; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-nowrap { white-space: nowrap; }

/* ==================== 前台布局与反馈 ==================== */
.pf-btn-block {
    width: 100%;
    justify-content: center;
}

.inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.login-logo {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.user-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
}

.topbar {
    flex-shrink: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-weight: 700;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #001529;
    color: #fff;
    font-weight: 800;
}

.brand-mark .app-logo-icon {
    width: 22px;
    height: 22px;
}

.brand-mark .app-logo-img {
    width: 22px;
    height: 22px;
}

.topnav {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #475569;
    font-weight: 600;
}

.user-main {
    flex: 1;
    width: 100%;
    padding: 32px 28px 48px;
}

.user-container {
    max-width: 1080px;
    margin: 0 auto;
}

.user-container-narrow {
    max-width: 780px;
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.welcome-panel h1 {
    margin: 0 0 8px;
    color: #111827;
}

.welcome-panel p {
    margin: 0;
    color: #65758b;
}

.global-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90vw;
    padding: 10px 20px;
    border-radius: 10px;
    background: #1e293b;
    color: #f1f5f9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
}

.admin-page.layout-admin-shell .global-toast {
    left: calc(50% + 110px);
}

@media (max-width: 768px) {
    .admin-page.layout-admin-shell .global-toast {
        left: 50%;
    }
}

.global-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.global-toast-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.global-toast-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-toast--success .global-toast-icon {
    color: #22c55e;
}

.global-toast--error .global-toast-icon {
    color: #ef4444;
}

.global-toast--warning .global-toast-icon {
    color: #f59e0b;
}

.global-toast--info .global-toast-icon {
    color: #3b82f6;
}

@media (max-width: 680px) {
    .topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }

    .topnav {
        flex-wrap: wrap;
    }

    .user-main {
        padding: 20px 18px 36px;
    }

    .site-footer {
        width: calc(100% - 36px);
        padding: 14px 0 22px;
    }

    .welcome-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==================== 题库管理扩展组件（练题帮） ==================== */
.category-table-icon {
    color: #2563eb;
    font-size: 16px;
}

.form-group-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #373151;
    margin-bottom: 8px;
}

.form-tip {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.option-input-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.option-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-input-row input[type="text"] {
    flex: 1;
    min-width: 0;
}

.option-key-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.import-guide {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 13px;
    line-height: 1.8;
    color: #1e40af;
}

.import-guide p {
    margin: 0;
}

.import-guide b {
    color: #1d4ed8;
}

.import-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.import-discarded {
    margin-bottom: 16px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
}

.import-discarded summary {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    cursor: pointer;
}

.import-discarded-body {
    padding: 0 14px 12px;
    max-height: 260px;
    overflow-y: auto;
}

.import-discarded-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    border-bottom: 1px dashed #fecaca;
    font-size: 12px;
}

.import-discarded-row:last-child {
    border-bottom: none;
}

.import-discarded-text {
    color: #7f1d1d;
    word-break: break-all;
}

.u-text-left {
    text-align: left !important;
}

.u-text-sm {
    font-size: 12px;
}

.u-text-muted {
    color: #9ca3af;
}

.u-mt-16 {
    margin-top: 16px;
}

.u-mb-8 {
    margin-bottom: 8px;
}

/* ==================== 题库切换条（多题库） ==================== */
.bank-switch {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  margin-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bank-switch::-webkit-scrollbar { display: none; }
.bank-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-secondary, #4b5563);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.bank-switch-item i { font-size: 16px; }
.bank-switch-item.active {
  background: var(--primary-color, #2563eb);
  border-color: var(--primary-color, #2563eb);
  color: #ffffff;
  font-weight: 600;
}
.bank-switch-item:hover { border-color: var(--primary-color, #2563eb); color: var(--primary-color, #2563eb); }
.bank-switch-item.active:hover { color: #ffffff; }
.bank-switch-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(52, 105, 78, .12);
  color: var(--primary-color, #34694e);
}
.bank-switch-item.active .bank-switch-count { background: rgba(255, 255, 255, .25); color: #ffffff; }

/* ==================== 荣誉体系：头衔/勋章胶囊与排名徽章 ==================== */
/* 头衔胶囊（前台后台共用） */
.honor-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}
.honor-chip i { font-size: 13px; }
.honor-chip-green { background: #e7f0ea; color: #34694e; border-color: #d3e4da; }
.honor-chip-blue { background: #eaf2ff; color: #3f65d8; border-color: #dbe8ff; }
.honor-chip-violet { background: #f5f3ff; color: #7c3aed; border-color: #e6ddfe; }
.honor-chip-gold { background: #fffbeb; color: #d97706; border-color: #fdeebc; }
.honor-chip-amber { background: #fdf3e7; color: #b45309; border-color: #f6e3c8; }
.honor-chip-slate { background: #eef1f4; color: #5b6b7c; border-color: #dfe5ea; }

/* 勋章胶囊（四档稀有度，配色对齐 MetaStack Badge 插件） */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 10px 2px 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe3ef;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-chip i { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; flex: 0 0 18px; }
.badge-chip-normal { color: #2563eb; }
.badge-chip-normal i { background: #eff6ff; }
.badge-chip-rare { color: #4f46e5; }
.badge-chip-rare i { background: #eef2ff; }
.badge-chip-epic { color: #7c3aed; }
.badge-chip-epic i { background: #f5f3ff; }
.badge-chip-legendary { color: #d97706; }
.badge-chip-legendary i { background: #fffbeb; }

/* 排名徽章：前三名金银铜 */
.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef1f4;
  color: #5b6b7c;
  font-size: 13px;
  font-weight: 700;
}
.rank-medal.rank-1 { background: #fbbf24; color: #78350f; box-shadow: 0 2px 6px rgba(251, 191, 36, .45); }
.rank-medal.rank-2 { background: #cbd5e1; color: #334155; box-shadow: 0 2px 6px rgba(148, 163, 184, .45); }
.rank-medal.rank-3 { background: #f0b58c; color: #7c2d12; box-shadow: 0 2px 6px rgba(240, 181, 140, .45); }

/* ==================== 后台荣誉页专属 ==================== */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.admin-tab:hover { color: var(--primary-color, #2563eb); border-color: var(--primary-color, #2563eb); }
.admin-tab.active { background: var(--primary-color, #2563eb); border-color: var(--primary-color, #2563eb); color: #fff; }
.rank-user { display: flex; flex-direction: column; min-width: 0; }
.rank-user-name { color: #111827; font-weight: 600; line-height: 1.4; }
.rank-user-sub { color: #6b7280; font-size: 12px; line-height: 1.4; }
.rank-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-empty { color: #9ca3af; font-size: 12px; }
.rank-num-warn { color: #dc2626; }
.badge-table-icon { font-size: 18px; color: #d97706; }
.page-tip {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f0f7f2;
  border: 1px solid #d3e4da;
  color: #34694e;
  font-size: 13px;
  line-height: 1.6;
}
.grant-form .filter-inputs { align-items: flex-end; }

/* ==================== 全局水印层：全屏平铺、不挡交互（样式自愈由内联脚本负责） ==================== */
.global-watermark {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-repeat: repeat;
}