/* ==========================================
   Admin Panel - Spectre.css 精致紧凑版主题
   ========================================== */
/* 1. 核心重置 */
html { font-size: 16px !important; }
body { font-size: 14px; background-color: #f0f2f5; color: #333; transition: background-color 0.3s, color 0.3s;}

/* 基础变量 */
:root {
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 64px;
    --header-height: 52px;
    --primary-color: #006CE7;
    --primary-hover: #0060CE;
    --secondary-color: #f7f8f9;
    --border-color: #e4e7eb;
    --text-color: #3b4351;
    --text-muted: #8c98a4;
    --success-color: #32b643;
    --warning-color: #ffb700;
    --error-color: #e85600;
    --bg-body: #f0f2f5;
    --bg-card: #fff;
    --bg-header: #fff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-header: #0f172a;
    --bg-table-head: #f8fafc;
    --bg-table-hover: #f1f5f9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }
a, a:hover { text-decoration: none; }
.ti { vertical-align: middle; line-height: 1; }

/* ==================== 登录页面 ==================== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: url('../images/login-bg.jpg') no-repeat center center; background-size: 100% 100%;}
.login-container { width: 100%; max-width: 500px; padding: 1rem; }
.login-card { background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); overflow: hidden; }
.login-header { text-align: center; padding: 2rem 1.5rem 1rem; }
.login-logo { font-size: 3rem; color: var(--primary-color); line-height: 1; margin-bottom: 0.5rem; }
.login-body { padding: 1.5rem; }
.login-footer { text-align: center; padding: 1rem 1.5rem; border-top: 1px solid #eee; font-size: 0.75rem; color: #8c98a4; }

/* ==================== 整体框架 ==================== */
.admin-layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: var(--sidebar-width); background: var(--bg-sidebar); color: #fff; position: fixed; left: 0; top: 0; bottom: 0; z-index: 1000; transition: transform 0.25s ease; display: flex; flex-direction: column; }
.sidebar-header { height: var(--header-height); padding: 0 1rem; display: flex; align-items: center; background: var(--bg-sidebar-header); flex-shrink: 0; }
.sidebar-brand { font-size: 1.25rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 0.25rem; }
.sidebar-brand i { font-size: 1.25rem; color: #207ADD; }

.sidebar-nav { padding: 0.1rem 0; overflow-y: auto; flex: 1; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
.nav-section {border-top: 1px solid rgba(0,0,0,0.25);}
.nav-section-title { padding: 0.6rem 1.125rem; font-size: 1rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.nav-section-title .section-label i { font-size: 1rem; padding-right: 0.25rem; }
.nav-section-title .nav-arrow { transition: transform 0.3s ease; font-size: 0.75rem; margin-left: 0.25rem; }
.nav-section.collapsed .nav-arrow { transform: rotate(-90deg); }

/* 菜单分组折叠动画：纯高度过渡，干脆直接 */
.nav-section > .nav-menu {max-height: 500px; overflow: hidden; transition: max-height 0.3s ease;}
.nav-section.collapsed > .nav-menu {max-height: 0;}
.nav-menu { list-style: none; margin: 0; padding: 0; }
.nav-menu > li{margin: 0 auto;}
.nav-item { list-style: none; border-bottom: 1px solid rgba(0,0,0,0.125); padding: 1px 0;}
.nav-item:last-child{border-bottom: none;}
.nav-link { display: flex; align-items: center; padding: 0.5rem 1.25rem; color: #cbd5e1; gap: 0.5rem; transition: background-color 0.25s ease, color 0.25s ease; font-size: 0.875rem; }
.nav-link i { font-size: 0.75rem; }
.nav-link:hover { background: #334155; color: #fff; }
.nav-link.active { background: var(--primary-color); color: #fff; }



/* 表格响应式 */
.table-responsive { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 侧边栏遮罩层 (移动端) */
.sidebar-overlay {display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999;}
.sidebar-overlay.active { display: block; }

/* 主内容区 */
.main-wrapper { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.top-header { height: var(--header-height); background: var(--bg-header); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); transition: background-color 0.3s; }
.header-left, .header-right { display: flex; align-items: center; gap: 1rem; }

/* 侧边栏折叠按钮 */
.sidebar-toggle {display: none; background: transparent; border: none; font-size: 1.25rem; color: var(--text-color); cursor: pointer; padding: 0.25rem; margin-right: 0.5rem;}

.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-color); }
.breadcrumb a:hover { color: var(--primary-color); }
.header-btn { background: transparent; border: none; font-size: 1.25rem; color: var(--text-color); cursor: pointer; position: relative; padding: 0.25rem; border-radius: 4px; transition: background-color 0.2s; }
.header-btn:hover { background: var(--secondary-color); }
.header-btn .badge { position: absolute; top: -2px; right: -4px; font-size: 0.6rem; padding: 0.1rem 0.3rem; }
.user-menu { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: bold; }
.user-info { font-size: 0.8rem; line-height: 1.2; }
.user-name { font-weight: 600; color: var(--text-color); }
.user-role { color: var(--text-muted); font-size: 0.7rem; }

/* 内容容器 */
.content-wrapper { padding: 1rem 1.25rem; flex: 1; }
.page-header { margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; }
.page-title { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* 卡片 */
.card { background: var(--bg-card); border-radius: 4px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); margin-bottom: 1rem; transition: background-color 0.3s, border-color 0.3s; }
.card .card-header { padding: 0.75rem 1rem; padding-bottom:0.75rem; border-bottom: 1px solid var(--border-color); }
.card .card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card .card-body { padding: 0.75rem 1rem; }
.card .card-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border-color); background: var(--bg-table-head); transition: background-color 0.3s; }

/* 数据表格 */
.table th { background: var(--bg-table-head); font-weight: 600; padding: 0.5rem 0.75rem; font-size: 0.8125rem; border-bottom: 1px solid var(--border-color); color: var(--text-muted); transition: background-color 0.3s; }
.table td { padding: 0.6rem 0.75rem; font-size: 0.8125rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-table-hover); }
.table tbody tr:last-child td { border-bottom: none; }
.actions .btn { padding: 0.15rem 0.4rem; height: auto; }

/* 统计与过滤栏 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card { background: var(--bg-card); padding: 1rem; border-radius: 4px; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 1rem; transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 44px; height: 44px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1; margin-bottom: 0.25rem; }
.filter-bar {width:100%; background: var(--bg-card); padding: 0.25rem; border-radius: 3px; border: 1px solid var(--border-color); display: flex; gap: 0.25rem; margin-bottom: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter-bar .d-flex { flex-wrap: nowrap; }
.filter-bar .form-input { width: 180px; min-width: 0; }
.filter-bar-l{marign:0;}
.filter-bar-r{margin:0 0 0 auto;}
.toolbar { display: flex; justify-content: space-between; margin-bottom: 1rem; gap: 0.75rem; align-items: center; }

/* 表单紧凑 */
.form-group { margin-bottom: 0.75rem; }
.form-label { margin-bottom: 0.25rem; font-size: 0.85rem; font-weight: 500; }
.form-input, .form-select { padding: 0.5rem; height: 39px; line-height: 1.678; border-color: #cbd5e1; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box;}
.form-input:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(75,72,214,0.15); }
textarea.form-input { height: auto; }
.btn {height: 39px; padding: 0 1rem; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.2rem; border-radius: 3px; transition: all 0.2s; }
.btn.btn-sm {height: 29px; line-height: 29px; padding:0 0.5rem;}
.btn.btn-primary {background: var(--primary-color); border-color: var(--primary-color); }
.btn.btn-primary:hover {background: var(--primary-hover); border-color: var(--primary-hover); }

/* 颜色辅助 */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }
.bg-primary-light { background: #E2EEFC; color: #006CE7; }
.bg-success-light { background: #dcfce7; color: #16a34a; }
.bg-warning-light { background: #fef9c3; color: #ca8a04; }

/* 响应式断点定义:
   平板: <= 992px
   手机: <= 576px
*/
.bg-error-light { background: #fee2e2; color: #dc2626; }

/* 空状态 */
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h4 { margin-bottom: 0.5rem; color: var(--text-color); }
.empty-state p { margin-bottom: 1rem; font-size: 0.85rem; }

/* 表单验证反馈 */
.form-input.is-error { border-color: var(--error-color); }
.form-input.is-success { border-color: var(--success-color); }
.form-input-hint { font-size: 0.75rem; margin: 0.25rem 0;}
.form-input-hint.error { color: var(--error-color); }
.form-input-hint.success { color: var(--success-color); }

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-card);
    border-radius: 5px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0.95rem 1.5rem;
    transform: scale(0.9);
    transition: transform 0.3s;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.modal-header i { font-size: 1.5rem; color: var(--warning-color); }
.modal-header h4 { margin: 0; font-size: 1rem; }
.modal-body { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    min-width: 260px;
    animation: toastIn 0.3s ease;
}
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success-color); }
.toast.error i { color: var(--error-color); }
.toast.warning i { color: var(--warning-color); }
.toast.info i { color: var(--primary-color); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 页脚 */
.footer {
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: background-color 0.3s, border-color 0.3s;
}

/* 头像颜色变体 */
.avatar-xs { width: 24px; height: 24px; font-size: 0.7rem; }
.avatar-sm { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-blue { background: #207ADD; }
.avatar-green { background: #16a34a; }
.avatar-orange { background: #ea580c; }
.avatar-purple { background: #7c3aed; }
.avatar-cyan { background: #0891b2; }
.avatar-gray { background: #6b7280; }

/* 用户信息行 */
.user-row { display: flex; align-items: center; gap: 10px; }
.user-row-info { line-height: 1.3; }
.user-row-name { font-weight: 600; color: var(--text-color); }
.user-row-email { font-size: 0.75rem; color: var(--text-muted); }


/* ==================== 响应式设计 ==================== */

/* 平板 (<= 992px) */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .user-info { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 手机 (<= 576px) */
@media (max-width: 576px) {
    :root {
        --header-height: 48px;
    }
    .content-wrapper { padding: 0.75rem; }
    .page-title { font-size: 1.1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .card .card-body {padding: 0.5rem;}
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .form-select,
    .filter-bar .has-icon-left,
    .filter-bar .form-input { width: 100% !important; max-width: none !important; }
    .filter-bar-l,.filter-bar-r{width:100%; marign:0 auto;}
    .filter-bar-l .btn{width:50%;}
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .btn { width: 100%; justify-content: center; }
    .top-header { padding: 0 0.75rem; }
    .header-right { gap: 0.5rem; }
    .modal-content { width: 96%; padding: 1rem; }
    .page-header { flex-direction: column; }
    .dropdown-right .menu { left: auto !important; right: 0 !important; }
}

/* ==========================================
   工具类 - 用于替换内联样式
   ========================================== */

/* Flexbox 工具类 */
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.flex-1 { flex: 1; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.7rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex_center_wrap{align-items: center; flex-wrap: wrap;}

/* 宽度工具类 */
.w-150 { width: 150px; }
.w-250 { width: 250px; }
.max-w-500 { width:100%; max-width: 500px; }

/* 间距工具类 */
.mt-2 { margin-top: 1.5rem; }

/* 表单操作区样式 */
.form-actions {margin-top: 0.75rem; padding: 0.75rem 0 0.5rem 0; border-top: 1px solid var(--border-color);}

/* 表单元素组 - 复选框和单选按钮行内排列 */
.form-checkbox-group,
.form-radio-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-checkbox.form-inline,
.form-radio.form-inline {
    margin-bottom: 0;
}

/* 文件上传样式 */
.file-upload-wrapper input[type="file"] {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: var(--primary-color);
}

/* 日期时间选择器样式 */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    font-family: inherit;
}

/* ==========================================
   图片上传组件样式
   ========================================== */

/* 单图片上传 */
.image-upload-single {
    position: relative;
}

.image-upload-single .upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 160px;
}

.image-upload-single .upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(75, 72, 214, 0.05);
}

.image-upload-single .upload-area i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.image-upload-single .upload-area:hover i {
    color: var(--primary-color);
}

.image-upload-single .upload-area span {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.image-upload-single .upload-area small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 单图片预览 */
.image-preview-single {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.image-preview-single img {
    display: block;
    width: 300px;
    height: 160px;
    object-fit: cover;
}

.image-preview-single .btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.image-preview-single .btn-remove:hover {
    background: var(--error-color);
    transform: scale(1.1);
}

/* 多图片上传 */
.image-upload-multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.image-upload-multiple .upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.image-upload-multiple .upload-btn:hover {
    border-color: var(--primary-color);
    background: rgba(75, 72, 214, 0.05);
}

.image-upload-multiple .upload-btn i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.image-upload-multiple .upload-btn:hover i {
    color: var(--primary-color);
}

.image-upload-multiple .upload-btn span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 多图片预览列表 */
.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-preview-list .preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.image-preview-list .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-list .preview-item .btn-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.8rem;
    opacity: 0;
}

.image-preview-list .preview-item:hover .btn-remove {
    opacity: 1;
}

.image-preview-list .preview-item .btn-remove:hover {
    background: var(--error-color);
    transform: scale(1.1);
}

/* ==========================================
   Panel.js 组件样式
   ========================================== */

/* 搜索框清除按钮 */
.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    font-size: 1rem;
}
.search-clear-btn:hover { color: var(--text-color); }

/* 分页组件 */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    color: var(--text-muted);
}
.page-info {
    margin-left: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 批量操作工具栏 */
.batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-table-head);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.batch-toolbar .batch-count { color: var(--text-muted); font-size: 0.85rem; }
.batch-toolbar .batch-count strong { color: var(--primary-color); }
.batch-toolbar .batch-actions { display: flex; gap: 0.5rem; }

/* 图片预览 */
.image-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.image-preview-overlay.active {
    opacity: 1;
    visibility: visible;
}
.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.image-preview-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
}
.image-preview-content .preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-preview-content .preview-close:hover {
    background: rgba(255,255,255,0.3);
}

/* 拖拽排序 */
[draggable="true"].dragging {
    opacity: 0.5;
}

/* 表格排序 */
th.sort-asc::after {
    content: ' ▲';
    font-size: 0.75rem;
    color: var(--primary-color);
}
th.sort-desc::after {
    content: ' ▼';
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* 文件图标颜色工具类 */
.file-icon-pdf { color: #dc2626; }
.file-icon-word { color: #2563eb; }
.file-icon-excel { color: #16a34a; }
.file-icon-zip { color: #ca8a04; }
.file-icon-video { color: #9333ea; }
.file-icon-audio { color: #0891b2; }
.file-icon-code { color: #4f46e5; }

/* 存储进度条宽度 */
.storage-progress-bar { width: 65%; }

/* 通知类型颜色工具类 */
.notify-type-system { color: #1E70CA; }
.notify-type-message { color: #16a34a; }
.notify-type-sms { color: #ca8a04; }
.notify-type-email { color: #dc2626; }

/* ==========================================
   文章编辑页面 - 右侧图片区域优化
   ========================================== */

/* 左侧列添加右间距 */
.article-edit-layout .column.col-9 {
    padding-right: 1.5rem;
}

/* 右侧列图片上传区域 */
.column.col-3 .image-upload-single .upload-area {
    min-height: 120px;
    padding: 1.5rem;
}

.column.col-3 .image-upload-single .upload-area i {
    font-size: 2rem;
}

.column.col-4 .image-upload-single .upload-area span {
    font-size: 0.85rem;
}

.column.col-3 .image-upload-single .upload-area small {
    font-size: 0.7rem;
}

.column.col-3 .image-preview-single img {
    width: 100%;
    height: 140px;
}

.column.col-3 .image-upload-multiple .upload-btn {
    width: 80px;
    height: 80px;
}

.column.col-3 .image-upload-multiple .upload-btn i {
    font-size: 1.5rem;
}

.column.col-3 .image-upload-multiple .upload-btn span {
    font-size: 0.7rem;
}

.column.col-3 .image-preview-list {
    gap: 0.5rem;
}

.column.col-3 .image-preview-list .preview-item {
    width: 80px;
    height: 80px;
}

/* 编辑器工具栏 */
.editor-toolbar {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--bg-table-head);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.editor-textarea {
    border-radius: 0 0 4px 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .column.col-3 .image-preview-single img {
        width: 100%;
        height: auto;
    }
    
    .column.col-3 .image-upload-multiple .upload-btn {
        width: 100%;
        height: 80px;
    }
}

/* ==========================================
   兼容层 - 支持现有分页和表单结构
   ========================================== */

/* 分页 (ul/li 结构兼容) */
.pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}
.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination li a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}
.pagination li.active span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    cursor: default;
}
.pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}

/* 输入框组兼容 */
.input-group {
    width: 100%;
    display: flex;
    align-items: stretch;
}
.input-group .form-input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}
.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: auto;
}

/* 一些旧版类的兼容 */
.m-r-5 { margin-right: 0.5rem; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.25rem; }
.pr { position: relative; }
.table-img { width: 60px; height: 40px; object-fit: cover; border-radius: 3px; }
.table-img-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; }
.thumb-preview-sm { max-width: 120px; max-height: 80px; border-radius: 3px; object-fit: cover; }

/* ==========================================
   页面内联样式合并#006CE7
   ========================================== */

/* 缩略图预览 */
#pic_preview_container{width:100%;}
.thumb-preview { width: 100%; max-height: 150px; object-fit: cover; margin-top: 10px; border-radius: 3px; }

/* 图集上传预览 */
.imgs-preview-container {width: 100%; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.imgs-preview-container .img-item { position: relative; width: 48%; height: 120px; border-radius: 3px; overflow: hidden; }
.imgs-preview-container .img-item img { width: 100%; height: 100%; object-fit: cover; }
.imgs-preview-container .img-item .btn-remove-img { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.imgs-preview-container .img-item .btn-remove-img:hover { background: #e85600; }

/* 附件列表 */
.attachment-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; margin-bottom: 6px; background: #f8fafc; border-radius: 4px; border: 1px solid #e4e7eb; }
.attachment-item .btn-remove-attachment { width: 24px; height: 24px; padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-left: 8px; }
.attachment-item .btn-remove-attachment:hover { background: #e85600; }

/* 日志详情弹窗 */
.log-detail-body { background: #f5f5f5; padding: 20px; }
.log-detail-box { background: #fff; padding: 20px; border-radius: 4px; }
.log-detail-item { margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.log-detail-label { font-weight: bold; color: #666; margin-bottom: 5px; }
.log-detail-value { color: #333; word-break: break-all; }
.log-detail-json { background: #f8f8f8; padding: 10px; border-radius: 4px; font-family: monospace; white-space: pre-wrap; }

/* 弹窗内日志详情（layer type:1） */
.log-detail { font-size: 0.875rem; padding: 0.5rem 1.25rem;}
.log-detail .detail-row { display: flex; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.log-detail .detail-row:last-child { border-bottom: none; }
.log-detail .detail-label { width: 100px; color: var(--text-muted); flex-shrink: 0; }
.log-detail .detail-value { flex: 1; }
.log-detail .detail-code { background: #f8fafc; padding: 0.75rem; border-radius: 4px; font-size: 0.75rem; overflow-x: auto; flex: 1; }

/* 彩色 badge（操作日志标签） */
.badge.badge-success { background: #dcfce7; color: #16a34a; }
.badge.badge-error   { background: #fee2e2; color: #dc2626; }
.badge.badge-warning { background: #fef9c3; color: #ca8a04; }
.badge.badge-primary { background: #e0e7ff; color: #1E70CA; }
.badge.badge-secondary { background: #f1f5f9; color: #64748b; }

/* 常用宽度 */
.w-60 { width: 60px; }
.system_info {box-shadow:none;}
.system_info > .menu-item{padding: 0.25rem 0.25rem 0.5rem 0.25rem;}