/* ===== 全局基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; line-height: 1.5; }
a { color: #1890ff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #40a9ff; }
img { max-width: 100%; height: auto; }

/* ===== 头部样式 ===== */
.header {
    background: #1a1a2e;
    color: #fff;
    padding: 0 24px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.header h1 { font-size: 20px; font-weight: 600; letter-spacing: 0.5px; }
.header .user-info { display: flex; align-items: center; gap: 24px; }
.header .user-info a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.header .user-info a:hover { color: #fff; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: calc(100vh - 64px); }
.content { flex: 1; padding: 24px; overflow-x: auto; background: #f0f2f5; }
.content > * { max-width: 100%; }
.content > .page-header ~ * { margin-top: 0; }

/* ===== 侧边栏 ===== */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: width 0.3s ease;
}

/* 侧边栏折叠按钮 */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 210px;
    width: 16px;
    height: 60px;
    background: #04a84e;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
}

.sidebar-toggle i {
    color: #fff;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* 折叠状态下按钮位置 */
body.sidebar-collapsed .sidebar-toggle {
    left: 50px;
}

/* 折叠状态下的侧边栏 */
body.sidebar-collapsed .sidebar {
    width: 50px;
}

body.sidebar-collapsed .sidebar .menu {
    padding: 10px 0;
}

body.sidebar-collapsed .sidebar .menu-item {
    margin: 2px 0;
}

body.sidebar-collapsed .sidebar .menu-item a {
    padding: 15px 0;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    text-align: center;
}

/* 折叠状态下隐藏所有文字，只显示图标 */
body.sidebar-collapsed .sidebar .menu-item a span,
body.sidebar-collapsed .sidebar .submenu-icon {
    display: none !important;
}

body.sidebar-collapsed .sidebar .menu-icon {
    margin-right: 0 !important;
    font-size: 18px;
}

/* 折叠状态下隐藏子菜单 */
body.sidebar-collapsed .sidebar .submenu {
    display: none !important;
}

/* 折叠按钮旋转 */
body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar .menu-item a span,
body.sidebar-collapsed .sidebar .submenu-icon {
    display: none;
}

body.sidebar-collapsed .sidebar .menu-icon {
    margin-right: 0;
    font-size: 18px;
}

/* 折叠状态下隐藏子菜单 */
body.sidebar-collapsed .sidebar .submenu {
    display: none !important;
}

/* 折叠按钮旋转 */
body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* 确保所有文字都隐藏 */
body.sidebar-collapsed .sidebar .menu-item a span,
body.sidebar-collapsed .sidebar .submenu-icon,
body.sidebar-collapsed .sidebar .menu-item a {
    font-size: 0;
}

body.sidebar-collapsed .content {
    margin-left: 0;
}
.sidebar .logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.sidebar .menu { list-style: none; padding: 12px 0; margin: 0; }
.sidebar .menu li { list-style: none; }
.sidebar .menu-item { padding: 0; cursor: pointer; }

/* 一级菜单项 */
.sidebar .menu-item > a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}
.sidebar .menu-item > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sidebar .menu-item.active > a {
    background: rgba(24, 144, 255, 0.2);
    color: #fff;
    border-left-color: #1890ff;
}

/* 菜单图标 */
.sidebar .menu-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    opacity: 0.9;
}

/* 子菜单样式 */
.sidebar .menu-item.has-submenu { position: relative; }
.sidebar .menu-item.has-submenu > a {
    display: flex !important;
    align-items: center;
    font-weight: 500;
}
.sidebar .menu-item.has-submenu > a > .menu-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.sidebar .menu-item.has-submenu .submenu-icon {
    font-size: 12px !important;
    margin-left: auto;
    transition: transform 0.3s ease !important;
    opacity: 0.6;
}
.sidebar .menu-item.has-submenu.open > a .submenu-icon {
    transform: rotate(90deg) !important;
    opacity: 1;
}
.sidebar .menu-item.has-submenu .submenu {
    display: none !important;
    background: rgba(0, 0, 0, 0.2);
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.sidebar .menu-item.has-submenu.open > .submenu {
    display: block !important;
}

/* 二级菜单 */
.sidebar .submenu .sub-level-1 {
    display: block;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}
.sidebar .submenu .sub-level-1.has-submenu > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 10px 48px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 13px;
}
.sidebar .submenu .sub-level-1.has-submenu > a:hover {
    background: rgba(24, 144, 255, 0.15);
    color: #fff;
}
.sidebar .submenu .sub-level-1 > a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 10px 12px 10px 48px;
    font-size: 13px;
    transition: all 0.2s ease;
}
.sidebar .submenu .sub-level-1 > a:hover {
    background: rgba(24, 144, 255, 0.15);
    color: #fff;
}

/* 无限级子菜单 */
.sidebar .submenu ul {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.sidebar .has-submenu.open > ul {
    display: block !important;
}

/* 各级菜单缩进 - 支持无限级 */
.sidebar .submenu li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    transition: all 0.2s ease;
}

/* 第1级分类 (直接子菜单) */
.sidebar .submenu > li > a {
    padding-left: 48px;
}

/* 第2级分类 */
.sidebar .submenu > li > ul > li > a {
    padding-left: 68px;
}

/* 第3级分类 */
.sidebar .submenu > li > ul > li > ul > li > a {
    padding-left: 88px;
}

/* 第4级分类 */
.sidebar .submenu > li > ul > li > ul > li > ul > li > a {
    padding-left: 108px;
}

/* 第5级分类 */
.sidebar .submenu > li > ul > li > ul > li > ul > li > ul > li > a {
    padding-left: 128px;
}

/* 第6级及以上分类 */
.sidebar .submenu > li > ul > li > ul > li > ul > li > ul > li > ul > li > a {
    padding-left: 148px;
}

/* 子菜单项hover效果 */
.sidebar .submenu li > a:hover {
    background: rgba(24, 144, 255, 0.15);
    color: #fff;
}

/* 有子菜单的项样式 */
.sidebar .submenu li.has-submenu > a {
    font-weight: 500;
}

/* 叶子节点样式 */
.sidebar .submenu li:not(.has-submenu) > a {
    color: rgba(255, 255, 255, 0.6);
}
.sidebar .submenu li:not(.has-submenu) > a:hover {
    background: rgba(24, 144, 255, 0.1);
    color: #fff;
}

/* 折叠箭头样式 - 支持所有层级 */
.sidebar .submenu li.has-submenu > a .submenu-icon {
    font-size: 11px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}
.sidebar .submenu li.has-submenu.open > a .submenu-icon {
    transform: rotate(90deg);
    opacity: 1;
}

/* 选中状态 */
.sidebar .menu-item.active > a,
.sidebar .submenu .sub-level-1.active > a,
.sidebar .submenu .sub-level-2.active > a {
    background: rgba(24, 144, 255, 0.2) !important;
    color: #fff !important;
    border-left-color: #1890ff;
}


/* 分类管理页面专用样式 */
.header-buttons {
    display: flex;
    gap: 10px;
}

.tree-card {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tree-item {
    margin: 4px 0;
}

.tree-node {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 4px;
    gap: 8px;
}

.tree-toggle {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.tree-icon {
    color: #ffc107;
}

.tree-name {
    font-weight: 500;
}

.tree-sort {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}

.tree-status {
    font-size: 12px;
    margin-left: 10px;
}

.tree-status.status-show {
    color: #52c41a;
}

.tree-status.status-hide {
    color: #999;
}

.tree-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.btn-add-child {
    color: #171718 !important;
}

.tree-children {
    display: none;
    margin-left: 24px;
}

.tree-children.show {
    display: block;
}

/* 分类页面样式 */
.header-buttons {
    display: flex;
    gap: 10px;
}

.tree-card {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tree-item {
    margin: 4px 0;
}

.tree-node {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 4px;
    gap: 8px;
    position: relative;
}

.tree-toggle {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.tree-icon {
    color: #ffb700;
}

.tree-name {
    font-weight: 500;
}

.tree-info {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}
.tree-info.green {
    color: #52c41a;
}
.tree-info.orange {
    color: #fa8c16;
}
.tree-info.gray {
    color: #999;
}

.tree-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.tree-actions .primary {
    color: #111111 !important;
}

.btn-danger {
    color: #fff !important;
    background: #f5222d !important;
    border-color: #f5222d !important;
}

/* 树形缩进 + 连接线 + └── 符号 */
.tree-children {
    display: none;
    margin-left: 26px;
    position: relative;
}
.tree-children.show {
    display: block;
}

/* 二级开始显示 └── */
.tree-item[data-level="1"] .tree-node::before {
    content: "└── ";
    position: absolute;
    left: 0px;
    top: 10px;
    font-size: 12px;
    color: #ccc;
}
.tree-item[data-level="2"] .tree-node::before {
    content: "└── ";
    position: absolute;
    left: 0px;
    top: 10px;
    font-size: 12px;
    color: #ccc;
}
.tree-item[data-level="3"] .tree-node::before {
    content: "└── ";
    position: absolute;
    left: 0px;
    top: 10px;
    font-size: 12px;
    color: #ccc;
}

/* 危险按钮强制白色文字，醒目清晰 */
.btn-danger.btn-delete {
    background-color: #f5222d !important;
    color: #fff !important;
    border-color: #f5222d !important;
}
.btn-danger.btn-delete:hover {
    background-color: #d32029 !important;
    border-color: #d32029 !important;
}



/* ===== 页面标题 ===== */
.page-title { font-size: 20px; font-weight: 600; color: #1a1a1a; margin: 0; }
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.page-header .page-title { margin-bottom: 0; }
.page-header .toolbar { margin-top: 0; }

/* ===== 工具栏 ===== */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 16px; }
.search-form .form-control { width: auto; min-width: 120px; padding: 6px 10px; }
.search-form .form-control-sm { width: auto; padding: 6px 10px; }
.search-form .btn { white-space: nowrap; }
.form-control-sm { width: 100px !important; }
.form-control-md { width: 120px !important; }

/* ===== 搜索信息提示 ===== */
.search-info { display: flex; align-items: center; gap: 8px; padding: 10px 15px; background: #e6f7ff; border: 1px solid #91d5ff; border-radius: 4px; color: #1890ff; margin-bottom: 16px; }
.search-info i { font-size: 14px; }
.search-info strong { color: #096dd9; }


/* 高级搜索区域美化 */
#advancedSearch {
  background: #fafbfc !important;
  border: 1px solid #e8e8e8 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

/* 高级搜索表单输入框统一美化 */
#advancedSearch input.form-control,
#advancedSearch select.form-control {
  height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid #dcdfe6 !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
  background: #fff !important;
}

/* 输入框聚焦效果 */
#advancedSearch input.form-control:focus,
#advancedSearch select.form-control:focus {
  border-color: #1890ff !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.15) !important;
  outline: none !important;
}

/* 下拉选择框箭头美化 */
#advancedSearch select.form-control {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 28px !important;
}

/* 搜索区域文字标签美化 */
#advancedSearch span {
  font-size: 14px !important;
  color: #555 !important;
  font-weight: 500 !important;
  min-width: 44px !important;
}

/* 按钮美化统一 */
#advancedSearch .btn {
  height: 34px !important;
  line-height: 32px !important;
  padding: 0 16px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
}

/* 批量工具条美化 */
.toolbar-batch {
    margin-top: 12px;
    padding: 14px 16px;
    background: #fff7e6 !important;
    border-radius: 6px !important;
    border: 1px solid #ffd591 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.toolbar-batch span {
    font-size: 14px;
    white-space: nowrap;
}

/* 批量区域输入框统一样式 */
.toolbar-batch .form-control {
    height: 32px !important;
    line-height: 32px !important;
    padding: 0 10px !important;
    border: 1px solid #d9d9d9;
    border-radius: 4px !important;
    font-size: 14px;
    transition: all 0.2s;
}
.toolbar-batch .form-control:focus {
    border-color: #fa8c16;
    box-shadow: 0 0 0 2px rgba(250, 140, 22, 0.1);
    outline: none;
}

/* 按钮统一高度、排版 */
.toolbar-batch .btn {
    height: 32px !important;
    padding: 0 12px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* 分隔线美化 */
.toolbar-batch .divider {
    color: #d9d9d9 !important;
    margin: 0 4px;
}

/* 标题文字强化 */
.toolbar-batch .title {
    font-weight: 600 !important;
    color: #fa8c16 !important;
}






/* ===== 表格 ===== */
/* 使用说明：所有表格都需要包裹在 <div class="table-responsive"> 容器中
   可用表格样式类：
   - .table: 通用列表表格，适合文章列表、分类列表等常规数据展示
   - .data-table: 数据展示表格，更紧凑，适合表单数据、用户数据等密集型展示
   - .compact-table: 紧凑型表格，适合移动端或数据较少的场景
   - .bordered-table: 边框表格，适合需要清晰分隔线的场景
   - .striped-table: 斑马纹表格，适合需要交替行背景的场景
   - .detail-table: 详情表格，适合展示单条数据的详细信息（如订单详情）
   - .stats-table: 统计表格，适合展示统计数据和指标
   - .simple-table: 简洁表格，适合不需要太多装饰的场景
   - .status-table: 状态指示表格，适合显示状态、进度等需要视觉反馈的场景

   示例：
   <div class="table-responsive">
       <table class="table">
           <thead>...</thead>
           <tbody>...</tbody>
       </table>
   </div>
*/
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 通用列表表格 */
.table-responsive .table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .table th,
.table-responsive .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.table-responsive .table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.table-responsive .table tr:hover {
    background: #fafafa;
}
.table-responsive .table tr:last-child td {
    border-bottom: none;
}
.table-responsive .table .btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

/* 数据展示表格（更紧凑，适合数据密集型展示） */
.table-responsive .data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .data-table th,
.table-responsive .data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}
.table-responsive .data-table th {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.table-responsive .data-table tbody tr {
    transition: background 0.2s;
}
.table-responsive .data-table tbody tr:hover {
    background: #f0f7ff;
}
.table-responsive .data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.table-responsive .data-table tbody tr:nth-child(even):hover {
    background: #f0f7ff;
}
.table-responsive .data-table tbody tr:last-child td {
    border-bottom: none;
}
.table-responsive .data-table code {
    background: #f1f3f5;
    color: #495057;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* 紧凑型表格（适合移动端或数据较少的场景） */
.table-responsive .compact-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.table-responsive .compact-table th,
.table-responsive .compact-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}
.table-responsive .compact-table th {
    background: #fff;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    border-bottom: 2px solid #dee2e6;
}
.table-responsive .compact-table tr:hover {
    background: #f8f9fa;
}
.table-responsive .compact-table tr:last-child td {
    border-bottom: none;
}

/* 边框表格（适合需要清晰分隔线的场景） */
.table-responsive .bordered-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .bordered-table th,
.table-responsive .bordered-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #e9ecef;
    font-size: 14px;
}
.table-responsive .bordered-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.table-responsive .bordered-table tr:hover {
    background: #f8f9fa;
}

/* 斑马纹表格 */
.table-responsive .striped-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .striped-table th,
.table-responsive .striped-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.table-responsive .striped-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.table-responsive .striped-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.table-responsive .striped-table tbody tr:hover {
    background: #e9ecef;
}
.table-responsive .striped-table tbody tr:last-child td {
    border-bottom: none;
}

/* 详情表格（适合展示单条数据的详细信息） */
.table-responsive .detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .detail-table th,
.table-responsive .detail-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.table-responsive .detail-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    width: 25%;
    text-align: right;
}
.table-responsive .detail-table td {
    font-weight: 400;
    color: #333;
}
.table-responsive .detail-table tbody tr:last-child td {
    border-bottom: none;
}
.table-responsive .detail-table tbody tr:hover {
    background: #fafafa;
}
.table-responsive .detail-table tbody tr:hover th {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 统计表格（适合展示统计数据） */
.table-responsive .stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .stats-table th,
.table-responsive .stats-table td {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.table-responsive .stats-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}
.table-responsive .stats-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: #f8f9fa;
}
.table-responsive .stats-table .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1890ff;
}
.table-responsive .stats-table .stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.table-responsive .stats-table tbody tr:last-child td {
    border-bottom: none;
}
.table-responsive .stats-table tbody tr:hover {
    background: #f0f7ff;
}

/* 简洁表格（适合不需要太多装饰的场景） */
.table-responsive .simple-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table-responsive .simple-table th,
.table-responsive .simple-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}
.table-responsive .simple-table th {
    background: transparent;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.table-responsive .simple-table tr:hover {
    background: #fafafa;
}
.table-responsive .simple-table tr:last-child td {
    border-bottom: none;
}

/* 状态指示表格（适合显示状态、进度等） */
.table-responsive .status-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.table-responsive .status-table th,
.table-responsive .status-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.table-responsive .status-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.table-responsive .status-table tbody tr {
    transition: all 0.3s;
}
.table-responsive .status-table tbody tr:hover {
    transform: translateX(4px);
    background: #fafafa;
}
.table-responsive .status-table .status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}
.table-responsive .status-table .status-indicator.success {
    background: #52c41a;
    box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.1);
}
.table-responsive .status-table .status-indicator.warning {
    background: #fa8c16;
    box-shadow: 0 0 0 3px rgba(250, 140, 22, 0.1);
}
.table-responsive .status-table .status-indicator.error {
    background: #ff4d4f;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.1);
}
.table-responsive .status-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 表格内的Input元素样式 ===== */

/* 通用列表表格内的Input */
.table-responsive .table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}
.table-responsive .table input[type="checkbox"]:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* 数据表格内的Input */
.table-responsive .data-table input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}
.table-responsive .data-table input[type="checkbox"]:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* 紧凑型表格内的Input */
.table-responsive .compact-table input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}

/* 边框表格内的Input */
.table-responsive .bordered-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}

/* 斑马纹表格内的Input */
.table-responsive .striped-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}

/* 详情表格内的Input */
.table-responsive .detail-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #764ba2;
    margin: 0;
    vertical-align: middle;
}

/* 统计表格内的Input */
.table-responsive .stats-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}

/* 简洁表格内的Input */
.table-responsive .simple-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}

/* 状态指示表格内的Input */
.table-responsive .status-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}
.table-responsive .status-table input[type="checkbox"]:checked {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 表格头部的复选框 - 所有表格通用 */
.table-responsive thead input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}
.table-responsive thead input[type="checkbox"]:hover {
    transform: scale(1.15);
    transition: transform 0.2s;
}

/* 专门的表格头复选框样式（保持向后兼容） */
.table-responsive .header-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
}
.table-responsive .header-checkbox:hover {
    transform: scale(1.15);
    transition: transform 0.2s;
}

/* 专门的表格行复选框样式（保持向后兼容） */
.table-responsive .row-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
    transition: all 0.2s ease;
}
.table-responsive .row-checkbox:checked {
    accent-color: #1890ff;
}
.table-responsive tbody tr:hover .row-checkbox {
    accent-color: #40a9ff;
    transform: scale(1.1);
}

/* 通用的表格行复选框样式 */
.table-responsive .item-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    vertical-align: middle;
    transition: all 0.2s ease;
}
.table-responsive tbody tr:hover .item-checkbox {
    accent-color: #40a9ff;
    transform: scale(1.1);
}

/* 表格行的复选框 - 所有表格通用 */
.table-responsive tbody input[type="checkbox"] {
    transition: all 0.2s ease;
}
.table-responsive tbody tr:hover input[type="checkbox"] {
    accent-color: #40a9ff;
    transform: scale(1.1);
}

/* 表格内其他类型的Input（如内联编辑） */
.table-responsive .table input[type="text"],
.table-responsive .table input[type="number"],
.table-responsive .table input[type="date"] {
    width: 100%;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}
.table-responsive .table input[type="text"]:focus,
.table-responsive .table input[type="number"]:focus,
.table-responsive .table input[type="date"]:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 数据表格内的文本Input */
.table-responsive .data-table input[type="text"],
.table-responsive .data-table input[type="number"] {
    width: 100%;
    max-width: 180px;
    padding: 5px 8px;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    font-size: 12px;
    background: #f8f9fa;
}
.table-responsive .data-table input[type="text"]:focus,
.table-responsive .data-table input[type="number"]:focus {
    border-color: #1677ff;
    background: #fff;
    outline: none;
}

/* 工具栏内的Input */
.toolbar input[type="text"],
.toolbar input[type="number"],
.toolbar input[type="date"],
.toolbar input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.toolbar input[type="text"]:focus,
.toolbar input[type="number"]:focus,
.toolbar input[type="date"]:focus,
.toolbar input[type="search"]:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
.toolbar input[type="text"]:hover,
.toolbar input[type="number"]:hover,
.toolbar input[type="date"]:hover,
.toolbar input[type="search"]:hover {
    border-color: #b7eb8f;
}

/* 搜索栏内的Input */
.search-bar input[type="text"],
.search-bar input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    transition: all 0.2s;
}
.search-bar input[type="text"]:focus,
.search-bar input[type="search"]:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
    min-width: 250px;
}

/* 表格内的选择框 */
.table-responsive select {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.table-responsive select:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
.table-responsive select:hover {
    border-color: #b7eb8f;
}

/* 禁用状态的Input */
.table-responsive input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.table-responsive input[type="checkbox"]:disabled:hover {
    transform: none;
}

/* ===== 表格行选中状态样式 ===== */

/* 通用表格行选中效果 */
.table-responsive .table tbody tr.selected {
    background: #e6f7ff;
}
.table-responsive .table tbody tr.selected td {
    border-bottom-color: #bae7ff;
}
.table-responsive .table tbody tr.selected input[type="checkbox"] {
    accent-color: #1890ff;
}

/* 数据表格行选中效果 */
.table-responsive .data-table tbody tr.selected {
    background: #e6f7ff;
    border-left: 3px solid #1890ff;
}
.table-responsive .data-table tbody tr.selected td {
    border-bottom-color: #bae7ff;
}

/* 状态表格行选中效果 */
.table-responsive .status-table tbody tr.selected {
    background: #f6ffed;
    border-left: 3px solid #52c41a;
}
.table-responsive .status-table tbody tr.selected input[type="checkbox"] {
    accent-color: #52c41a;
}

/* ===== 表格单元格内的Input样式优化 ===== */

/* 表格单元格内的紧凑文本输入框 */
.table-responsive .table td input[type="text"].inline-edit,
.table-responsive .table td input[type="number"].inline-edit {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    transition: all 0.2s;
}
.table-responsive .table td input[type="text"].inline-edit:focus,
.table-responsive .table td input[type="number"].inline-edit:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 表格单元格内的日期选择器 */
.table-responsive .table td input[type="date"].inline-edit {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    transition: all 0.2s;
}
.table-responsive .table td input[type="date"].inline-edit:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 表格单元格内的选择框 */
.table-responsive .table td select.inline-edit {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.table-responsive .table td select.inline-edit:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* ===== 表格工具栏Input样式 ===== */

/* 搜索输入框 */
.search-input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    transition: all 0.2s;
}
.search-input:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
.search-input:hover {
    border-color: #b7eb8f;
}

/* 表单控件样式 */
.form-control {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.form-control:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 表格操作栏内的Input */
.table-actions input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    font-size: 13px;
    width: 120px;
    transition: all 0.2s;
}
.table-actions input[type="text"]:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* ===== 表格内特殊Input样式 ===== */

/* 带图标的输入框 */
.table-responsive .input-with-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.table-responsive .input-with-icon i {
    position: absolute;
    left: 10px;
    color: #999;
    font-size: 14px;
    z-index: 1;
}
.table-responsive .input-with-icon input {
    padding-left: 32px;
}

/* 错误状态的Input */
.table-responsive .table td input.error {
    border-color: #ff4d4f;
    background: #fff1f0;
}
.table-responsive .table td input.error:focus {
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.1);
}

/* 成功状态的Input */
.table-responsive .table td input.success {
    border-color: #52c41a;
    background: #f6ffed;
}
.table-responsive .table td input.success:focus {
    box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.1);
}

/* 警告状态的Input */
.table-responsive .table td input.warning {
    border-color: #fa8c16;
    background: #fff7e6;
}
.table-responsive .table td input.warning:focus {
    box-shadow: 0 0 0 2px rgba(250, 140, 22, 0.1);
}

/* ===== 标签和徽章 ===== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-default { background: #fafafa; color: #999; border: 1px solid #d9d9d9; }
.badge-warning { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { background: #e6f7ff; color: #1890ff; padding: 2px 6px; border-radius: 3px; font-size: 11px; }

/* ===== 错误信息 ===== */
.error-info { font-size: 12px; color: #ff4d4f; margin-top: 4px; }
.fix-link { color: #1890ff; cursor: pointer; text-decoration: underline; margin-left: 8px; }
.fix-link:hover { color: #40a9ff; }
.highlight { background: #fff566; color: #d48806; padding: 0 2px; border-radius: 2px; }
.keyword-highlight { background: #ff4d4f; color: #fff; padding: 1px 3px; border-radius: 2px; font-weight: 600; }
.context-preview { font-size: 13px; color: #666; background: #f5f5f5; padding: 6px 10px; border-radius: 4px; margin-top: 4px; font-family: monospace; }
.context-card { background: #fff; border: 1px solid #ffd591; border-left: 3px solid #fa8c16; border-radius: 6px; padding: 10px; margin: 8px 0; font-size: 13px; line-height: 1.6; color: #333; }

/* ===== 表单通用 ===== */
.form-group { margin-bottom: 16px; }
.form-group > label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; font-size: 14px; }
.form-group.inline > label { display: inline-block; margin-bottom: 0; margin-right: 8px; }
.form-group.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 模型字段中的单选按钮容器 - 确保不换行 */
.model-fields-container .form-group.inline {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="search"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group input[type="time"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group input[type="url"]::placeholder,
.form-group input[type="search"]::placeholder,
.form-group input[type="date"]::placeholder,
.form-group input[type="datetime-local"]::placeholder,
.form-group input[type="time"]::placeholder { color: #bfbfbf; }

/* ===== 按钮 ===== */
.btn {
    padding: 4px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    height: 32px;
    box-sizing: border-box;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}
.btn a {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #1677ff; color: #fff; box-shadow: 0 2px 4px rgba(22, 119, 255, 0.3); }
.btn-primary:hover { background: #4096ff; box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4); }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.3); }
.btn-default { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-default:hover { border-color: #1677ff; color: #1677ff; background: #f0f5ff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4); }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4); }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #ffc53d; }
.btn-sm { padding: 4px 12px; font-size: 13px; border-radius: 4px; }
.btn-link { background: none; border: none; color: #1677ff; padding: 0; }
.btn-link:hover { color: #4096ff; text-decoration: underline; }

/* ===== 其他工具样式 ===== */
.checkbox { width: 18px; height: 18px; cursor: pointer; }
.empty { text-align: center; padding: 60px; color: #999; }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a { display: inline-block; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; color: #666; text-decoration: none; font-size: 13px; }
.pagination a:hover { border-color: #1890ff; color: #1890ff; }
.pagination a.active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* ===== 状态 ===== */
.status-enabled { color: #52c41a; }
.status-disabled { color: #ff4d4f; }

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== 信息展示 ===== */
.info-item { display: flex; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.info-item:last-child { border-bottom: none; }
.info-label { width: 120px; color: #999; }
.info-value { color: #333; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col { flex: 1; min-width: 300px; }

/* ===== 统计卡片 ===== */
.stats-container { display: flex; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
    flex: 1;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 16px;
}
.stat-icon-blue { background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%); color: #1677ff; }
.stat-icon-green { background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%); color: #52c41a; }
.stat-icon-orange { background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%); color: #fa8c16; }
.stat-icon-red { background: linear-gradient(135deg, #fff1f0 0%, #ffccc7 100%); color: #ff4d4f; }
.stat-info h3 { font-size: 26px; font-weight: 600; margin-bottom: 4px; color: #1a1a1a; }
.stat-info p { color: #8c8c8c; font-size: 14px; margin: 0; }

/* ===== 模态框 ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }

/* 确保模型管理弹窗层级最高 */
#modelModal.modal-overlay {
    z-index: 9999 !important;
}

#modelModal .modal-container {
    z-index: 10000 !important;
}
.modal { background: #fff; border-radius: 12px; width: 520px; max-width: 95%; max-height: 90vh; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.2); animation: modalSlideIn 0.2s ease; }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 18px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; background: #fafafa; }
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #333; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { color: #333; background: #f0f0f0; }
.modal-body { padding: 24px; max-height: calc(90vh - 140px); overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; text-align: right; background: #fafafa; display: flex; justify-content: flex-end; gap: 12px; }
.modal-footer .btn { min-width: 80px; }

/* ===== 来源/推荐位管理弹窗 ===== */
#sourceModal, #sourceEditModal, #positionModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#sourceModal.show, #sourceEditModal.show, #positionModal.show {
    display: flex;
}

/* 弹窗容器宽度 90%，最大800px */
#sourceModal > div, #sourceEditModal > div, #positionModal > div {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 头部 */
.modal-m-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-m-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}
.modal-m-header a {
    color: #999;
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
}
.modal-m-header a:hover {
    color: #333;
}

/* 🔥 新增：主体内容区（你要的 90% 宽度） */
.modal-m-body {
    width: 90% !important;
    margin: 0 auto !important;
    padding: 24px 0 !important;
    flex: 1;
    overflow-y: auto;
}

/* 🔥 强制让表单宽度 100% 继承 */
.modal-m-body form {
    width: 100% !important;
}
.modal-m-body .form-group {
    width: 100% !important;
}

/* 底部 */
.modal-m-footer {
    width: 90% !important;
    margin: 0 auto !important;
    padding: 16px 0 !important;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-m-footer span {
    color: #999;
    font-size: 13px;
}
/* ===== 树形视图 ===== */
.tree-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.tree-item { margin-bottom: 8px; }
.tree-node { display: flex; align-items: center; padding: 12px; border-radius: 6px; background: #fff; border: 1px solid #f0f0f0; transition: all 0.2s; }
.tree-node:hover { background: #fafafa; border-color: #e8e8e8; }
.tree-toggle { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 8px; color: #666; transition: transform 0.2s; }
.tree-toggle.has-children { color: #1677ff; }
.tree-toggle.has-children.open { transform: rotate(90deg); }
.tree-icon { margin-right: 8px; color: #faad14; font-size: 15px; }
.tree-name { flex: 1; color: #333; font-size: 14px; }
.tree-code { flex: 1; color: #666; font-family: monospace; font-size: 13px; }
.tree-actions { display: flex; gap: 10px; margin-left: 15px; }
.tree-actions a { color: #0f0f0f; font-size: 14px; transition: color 0.2s; }
.tree-actions a:hover { color: #1677ff; }
.tree-children { display: none; padding-left: 28px; }
.tree-children.show { display: block; }
.tree-level-1 { padding-left: 0; }
.tree-level-2 { padding-left: 20px; }
.tree-level-3 { padding-left: 40px; }
.tree-level-4 { padding-left: 60px; }
.tree-level-5 { padding-left: 80px; }

/* ===== 批量管理树形 ===== */
.tree-container { background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.tree-container .tree-header { display: flex; align-items: center; padding: 14px 16px; background: #fafafa; border-bottom: 1px solid #f0f0f0; font-weight: 600; color: #333; font-size: 14px; }
.tree-container .tree-header > div { flex: 1; }
.tree-container .tree-header > div:first-child { flex: 0 0 40px; text-align: center; }
.tree-container .tree-header > div:nth-child(2) { flex: 0 0 80px; }
.tree-container .tree-header > div:nth-child(5) { flex: 0 0 120px; }
.tree-container .tree-header > div:nth-child(6) { flex: 0 0 100px; text-align: center; }
.tree-container .tree-node { display: flex; align-items: center; padding: 12px 16px; border-radius: 0; background: #fff; border-bottom: 1px solid #f5f5f5; transition: background 0.2s; }
.tree-container .tree-node:hover { background: #fafafa; }
.tree-container .tree-node > div { flex: 1; }
.tree-container .tree-node > div:first-child { flex: 0 0 40px; text-align: center; }
.tree-container .tree-node > div:nth-child(2) { flex: 0 0 80px; }
.tree-container .tree-node > div:nth-child(5) { flex: 0 0 120px; }
.tree-container .tree-node > div:nth-child(6) { flex: 0 0 100px; text-align: center; }
.tree-container .tree-icon { margin-right: 8px; color: #faad14; }
.tree-container .tree-name { flex: 1; color: #333; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tree-container .tree-code { flex: 1; color: #666; font-family: monospace; font-size: 13px; }
.tree-container .tree-actions { display: flex; gap: 10px; justify-content: center; }
.tree-container .tree-actions a { color: #666; transition: color 0.2s; }
.tree-container .tree-actions a:hover { color: #1677ff; }
.tree-container .tree-actions a:last-child:hover { color: #ff4d4f; }
.tree-container .tree-sort input { width: 60px; padding: 6px 8px; border: 1px solid #d9d9d9; border-radius: 4px; text-align: center; font-size: 14px; }
.tree-container .tree-sort input:focus { border-color: #1677ff; outline: none; }
.tree-container .tree-status { display: flex; gap: 6px; justify-content: flex-end; }
.tree-container .status-btn { padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; border: 1px solid #d9d9d9; background: #fff; color: #666; transition: all 0.2s; }
.tree-container .status-btn.show { background: #52c41a; color: #fff; border-color: #52c41a; }
.tree-container .status-btn.hidden { background: #f5f5f5; color: #999; border-color: #d9d9d9; }
.tree-container .status-btn:hover { border-color: #1677ff; }
.tree-container .search-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tree-container .search-input { flex: 1; min-width: 200px; padding: 8px 14px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.tree-container .search-input:focus { outline: none; border-color: #1677ff; }

/* 通用搜索框样式（不在tree-container内时使用） */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 14px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.search-input:focus { outline: none; border-color: #1677ff; }
.tree-container .footer-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fafafa; border-top: 1px solid #f0f0f0; }
.tree-container .footer-info { color: #666; font-size: 14px; }
.tree-container .footer-actions { display: flex; gap: 10px; }
.tree-container .empty-state { text-align: center; padding: 60px; color: #999; background: #fff; border-radius: 8px; font-size: 14px; }
.indent { color: #ccc; margin-right: 4px; }

/* ===== 配置页面 ===== */
.config-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.config-card textarea { width: 100%; min-height: 100px; padding: 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; resize: vertical; }
.config-card textarea:focus { outline: none; border-color: #40a9ff; }
.config-card input[type="text"],
.config-card input[type="number"],
.config-card input[type="email"] { width: 100%; max-width: 400px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.config-card input:focus { outline: none; border-color: #40a9ff; }
.config-card select { width: 100%; max-width: 200px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.config-card .tip { color: #999; font-size: 12px; margin-top: 4px; }
.config-card .form-group { margin-bottom: 20px; }
.config-card .form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #333; }

/* ===== 权限树 ===== */
.auth-tree { border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px; background: #fafafa; }
.auth-group { margin-bottom: 16px; padding: 12px; background: #fff; border-radius: 6px; border: 1px solid #e8e8e8; }
.auth-group:last-child { margin-bottom: 0; }
.auth-group-title { font-weight: 600; padding: 8px 12px; background: #f0f5ff; border-radius: 4px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.auth-group-title input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #1890ff; }
.auth-group-title label { cursor: pointer; font-size: 14px; color: #1a1a1a; }
.auth-items { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 12px; }
.auth-items { display: block !important; }
.auth-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f5f5f5; border-radius: 4px; border: 1px solid #e8e8e8; transition: all 0.2s; margin-bottom: 8px; }
.auth-item:hover { background: #e6f7ff; border-color: #1890ff; }
.auth-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #1890ff; }
.auth-item label { cursor: pointer; font-weight: normal; font-size: 13px; color: #595959; }

/* ===== 模板卡片 ===== */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.template-card { background: #fff; border-radius: 4px; overflow: visible; border: 1px solid #f0f0f0; position: relative; z-index: 1; }
.template-card.active { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.15); }
.template-card.active::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #1890ff; border-radius: 4px 4px 0 0; }
.template-thumb { height: 150px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #999; }
.template-thumb img { max-width: 100%; max-height: 100%; }
.template-info { padding: 15px; position: relative; z-index: 2; }
.template-info a,
.template-info .btn { 
    display: inline-block; 
    margin-right: 8px; 
    margin-top: 8px; 
    text-decoration: none; 
    position: relative; 
    z-index: 9999; 
    pointer-events: auto; 
}

/* ThinkPHP trace 调试面板不遮挡按钮点击 */
#think_page_trace { pointer-events: none; }
#think_page_trace * { pointer-events: auto; }
.template-info h3 { font-size: 16px; margin-bottom: 10px; }
.template-info p { color: #999; font-size: 12px; margin-bottom: 10px; }
.template-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.template-tags span { display: inline-block; padding: 2px 8px; background: #f0f0f0; border-radius: 4px; font-size: 12px; }
.template-tags span.active { background: #1890ff; color: #fff; }
.template-tags span.enabled { background: #52c41a; color: #fff; }

/* ===== 复选框增强 ===== */
.checkbox-all { width: 18px; height: 18px; cursor: pointer; accent-color: #1890ff; }
.checkbox-item { width: 18px; height: 18px; cursor: pointer; accent-color: #1890ff; }
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    max-height: 150px;
    overflow-y: auto;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    margin: 0;
    white-space: nowrap;
}
.checkbox-group label:hover {
    border-color: #1890ff;
    color: #1890ff;
    background: #e6f7ff;
}
.checkbox-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
    flex-shrink: 0;
}
.checkbox-group label:has(input:checked) {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}
.checkbox-group input[type="checkbox"]:checked + * {
    color: #1890ff;
}
input[type="checkbox"] {
    accent-color: #1890ff;
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}
input[type="radio"] { accent-color: #1890ff; }

/* ===== 表单卡片 ===== */
.form-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);  }

/* ===== 表单布局 ===== */
.form-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.form-row > * { min-width: 0; }
.form-col { flex: 1; min-width: 200px; }
.form-col-left { flex: 1; min-width: 400px; }
.form-col-right { width: 280px; flex-shrink: 0; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"],
.form-group select,
.form-group textarea { max-width: 100%; box-sizing: border-box; }

/* ===== 选项卡 ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.tab-item { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; color: #666; font-size: 14px; }
.tab-item:hover { color: #1890ff; }
.tab-item.active { color: #1890ff; border-bottom-color: #1890ff; font-weight: 500; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== 表单树 / 分类选择 ===== */
.form-tree { border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px; background: #fafafa; max-height: 250px; overflow-y: auto; }
.form-tree .radio-label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 2px 0; cursor: pointer; border-radius: 4px; transition: background 0.2s; }
.form-tree .radio-label:hover { background: #e6f7ff; }
.form-tree .radio-label input[type="radio"] { accent-color: #1890ff; width: 16px; height: 16px; }
.form-tree .radio-label span { font-size: 14px; color: #333; }
.form-tree .radio-label.level-1 { padding-left: 12px; }
.form-tree .radio-label.level-2 { padding-left: 32px; }
.form-tree .radio-label.level-3 { padding-left: 52px; }
.form-tree .radio-label.level-4 { padding-left: 72px; }
.form-tree .radio-label.level-5 { padding-left: 92px; }

.category-select { border: 1px solid #e8e8e8; border-radius: 4px; padding: 12px; background: #fafafa; max-height: 350px; overflow-y: auto; }
.category-item { display: flex; align-items: center; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.category-item:hover { background: #e6f7ff; }
.category-item.selected { background: #e6f7ff; border: 1px solid #1890ff; }
.category-toggle { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; color: #666; }
.category-toggle.has-children { cursor: pointer; color: #1890ff; }
.category-icon { margin-left: 6px; margin-right: 6px; color: #faad14; font-size: 14px; }
.category-name { color: #333; font-size: 13px; font-weight: 400; }
.category-children { display: none; padding-left: 20px; }
.category-children.show { display: block; }
.selected-info { margin-top: 8px; font-size: 13px; color: #1890ff; padding: 6px 10px; background: #e6f7ff; border-radius: 4px; }
/* ===== 封面上传 ===== */
.cover-upload { display: flex; flex-direction: column; gap: 10px; }
.cover-buttons { display: flex; gap: 8px; }
.btn-upload { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #fff; border: 1px solid #d9d9d9; border-radius: 4px; cursor: pointer; font-size: 14px; color: #666; }
.btn-upload:hover { border-color: #40a9ff; color: #40a9ff; }
.btn-delete { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #fff; border: 1px solid #ff4d4f; border-radius: 4px; cursor: pointer; font-size: 14px; color: #ff4d4f; }
.btn-delete:hover { background: #ff4d4f; color: #fff; }
.cover-preview { max-width: 300px; }
.cover-preview img { max-width: 100%; border-radius: 4px; border: 1px solid #e8e8e8; }

/* ===== 表单提示 ===== */
.required { color: #ff4d4f; margin-left: 4px; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; }

/* ===== 按钮组 ===== */
.btn-group { display: flex; gap: 10px; margin-top: 16px; }

/* ===== 路由地址 ===== */
.route { font-family: monospace; color: #666; font-size: 13px; }

/* ===== 布局扩展 ===== */
.layout-full { display: flex; min-height: 100vh; }
.layout-full .content { flex: 1; padding: 20px; }

.layout-no-header { display: flex; min-height: 100vh; }
.layout-no-header .sidebar { position: fixed; height: 100vh; overflow-y: auto; }
.layout-no-header .content { flex: 1; margin-left: 200px; padding: 20px; }

/* ===== 表单状态 ===== */
.form-control:disabled,
input:disabled,
select:disabled,
textarea:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
input[readonly],
.form-control[readonly] { background: #f5f5f5; }

/* ===== 输入框组 ===== */
.input-group { display: flex; }
.input-group .form-control { flex: 1; }
.input-group-addon { padding: 8px 12px; background: #f5f5f5; border: 1px solid #d9d9d9; border-radius: 4px; color: #666; }
.input-group > .input-group-addon:first-child { border-right: 0; }
.input-group > .form-control:last-child { border-left: 0; }
.input-group .input-group-addon:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.input-group .input-group-addon:last-child { border-left: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }

/* ===== 表单行内布局 ===== */
.form-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-inline .form-group { margin-bottom: 0; }

/* ===== 日期时间 ===== */
input[type="datetime-local"],
input[type="date"],
input[type="time"] { padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; }
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="time"]:focus { outline: none; border-color: #40a9ff; }

/* ===== 文件上传 ===== */
.file-input { display: none; }
.file-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: #fff; border: 1px dashed #d9d9d9; border-radius: 4px; cursor: pointer; color: #666; }
.file-label:hover { border-color: #40a9ff; color: #40a9ff; }
.file-list { margin-top: 10px; }
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #fafafa; border-radius: 4px; margin-bottom: 8px; }
.file-item-name { color: #333; }
.file-item-remove { color: #ff4d4f; cursor: pointer; }

/* ===== 图片上传 ===== */
.image-upload { display: flex; flex-direction: column; gap: 10px; }
.image-preview { max-width: 200px; border: 1px solid #e8e8e8; border-radius: 4px; padding: 10px; }
.image-preview img { max-width: 100%; }

/* ===== 富文本编辑器 ===== */
.editor-container { border: 1px solid #d9d9d9; border-radius: 4px; }
.editor-toolbar { padding: 8px; background: #fafafa; border-bottom: 1px solid #e8e8e8; }

/* ===== 警告提示 ===== */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; }
.alert-info { background: #e6f7ff; border: 1px solid #91d5ff; color: #1890ff; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #52c41a; }
.alert-warning { background: #fff7e6; border: 1px solid #ffd591; color: #fa8c16; }
.alert-danger { background: #fff1f0; border: 1px solid #ffa39e; color: #cf1322; }

/* ===== 加载状态 ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #999; }
.loading::after { content: ""; width: 20px; height: 20px; border: 2px solid #f0f0f0; border-top-color: #1890ff; border-radius: 50%; animation: spin 1s linear infinite; margin-left: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 下拉选择 ===== */
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ===== 文本域 ===== */
textarea.form-control { resize: vertical; min-height: 100px; }
textarea.form-control-sm { min-height: 60px; }
textarea.form-control-lg { min-height: 150px; }

/* ===== 分类管理选项卡 ===== */
.tab-container { margin-bottom: 20px; }
.tab-nav { display: flex; border-bottom: 2px solid #e8e8e8; margin-bottom: 20px; }
.tab-nav .tab-item { padding: 12px 24px; cursor: pointer; color: #666; font-weight: 500; transition: all 0.3s; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-nav .tab-item:hover { color: #1677ff; }
.tab-nav .tab-item.active { color: #1677ff; border-bottom-color: #1677ff; }

.tab-content h3 { margin-bottom: 16px; font-size: 16px; color: #333; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }

/* ===== 模板组合输入框 ===== */
.form-group .form-control[style*="flex: 1"] + select.form-control { min-width: 200px; max-width: 250px; }

/* ===== 权限树形列表 ===== */
.auth-tree { margin-top: 20px; }
.auth-item { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; transition: all 0.2s; }
.auth-item:hover { background: #fafafa; }
.auth-item .checkbox { width: 18px; height: 18px; cursor: pointer; margin-right: 12px; }
.auth-item .auth-info { flex: 1; }
.auth-item .auth-name { font-weight: 500; color: #333; margin-bottom: 4px; }
.auth-item .auth-meta { color: #999; font-size: 13px; }
.auth-item .auth-actions { margin-left: 20px; }
.auth-item .btn-group { display: flex; gap: 8px; }
.auth-children { margin-left: 30px; display: none; }
.auth-children.show { display: block; }
.toggle-icon { cursor: pointer; color: #999; transition: transform 0.2s; display: inline-block; width: 16px; text-align: center; }
.toggle-icon.expanded { transform: rotate(90deg); }

/* FontAwesome 图标修复 */
i[class*="fa-"] {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
}
i.fa-solid, i[class*=" fa-solid"] {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
i.fa-regular, i[class*=" fa-regular"] {
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
}
i.fa-brands, i[class*=" fa-brands"] {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.toolbar { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: #fafafa; border-radius: 8px; margin-bottom: 20px; }
.toolbar .checkbox-actions { display: flex; gap: 16px; align-items: center; }
.toolbar .checkbox-actions label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #333; }
.toolbar .checkbox-actions label:hover { color: #1677ff; }

/* ===== 角色管理表格样式 ===== */
.status-enabled { background: #52c41a; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.status-disabled { background: #999; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; }

/* ===== 权限选择树 ===== */
.auth-tree-select { max-height: 400px; overflow-y: auto; border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px; }
.auth-tree-select .auth-group { margin-bottom: 16px; }
.auth-tree-select .auth-group-title { font-weight: 600; color: #333; padding: 8px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.auth-tree-select .auth-group-title:hover { color: #1677ff; }
.auth-tree-select .auth-items { padding-left: 20px; margin-bottom: 8px; }
.auth-tree-select .auth-item-select { padding: 6px 8px; border: 1px solid #f0f0f0; border-radius: 4px; margin-bottom: 4px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.2s; background: #fff; }
.auth-tree-select .auth-item-select:hover { background: #fafafa; border-color: #d9d9d9; }
.auth-tree-select .auth-item-select.disabled { opacity: 0.5; cursor: not-allowed; }
.auth-tree-select .auth-item-select .checkbox { width: 18px; height: 18px; cursor: pointer; }

/* ===== 数字输入 ===== */
input[type="number"].form-control { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== 开关 ===== */
.switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 22px; transition: 0.3s; }
.switch-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: 0.3s; }
.switch input:checked + .switch-slider { background: #1890ff; }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }

/* ===== 进度条 ===== */
.progress { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: #1890ff; transition: width 0.3s; }

/* ===== Tooltip ===== */
.tooltip { position: relative; }
.tooltip::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding: 4px 8px; background: #333; color: #fff; font-size: 12px; border-radius: 4px; white-space: nowrap; opacity: 0; visibility: hidden; transition: 0.2s; }
.tooltip:hover::after { opacity: 1; visibility: visible; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ===== 空状态 ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #999; }
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state p { font-size: 14px; }


/* 后台登录页面样式 */


.body-login {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 50px;
    width: 100%;
    max-width: 420px;
}

.login-title {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    position: relative;
}

.login-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #1890ff;
    margin: 15px auto 0;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"] {
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="search"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="datetime-local"]:focus,
.form-group input[type="time"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group input[type="url"]::placeholder,
.form-group input[type="search"]::placeholder,
.form-group input[type="date"]::placeholder,
.form-group input[type="datetime-local"]::placeholder,
.form-group input[type="time"]::placeholder {
    color: #aaa;
}

.error-msg {
    background: #fee;
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #e74c3c;
}

.login-btn {
    width: 100%;
    height: 48px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* 响应式 */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 25px;
    }

    .login-title {
        font-size: 24px;
    }
}
/* 滑动登录验证样式 - 拼图验证码 */
.captcha-wrapper {
    margin-bottom: 20px;
}

.captcha-box {
    position: relative;
    width: 100%;
    height: 160px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.captcha-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* 缺口目标位置 */
.captcha-target {
    position: absolute;
    width: 44px;
    height: 44px;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

/* 可拖动的拼图块 */
.captcha-fill {
    position: absolute;
    width: 44px;
    height: 44px;
    left: 240px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #1890ff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: grab;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-fill::before {
    content: '';
    width: 0;
    height: 0;
}

.captcha-fill:active {
    cursor: grabbing;
}

/* 刷新按钮 */
.captcha-refresh {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.captcha-refresh:hover {
    background: #fff;
    transform: rotate(180deg);
}

.captcha-refresh i {
    color: #666;
    font-size: 14px;
}

/* 滑块轨道 */
.captcha-slider {
    position: relative;
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    border: 1px solid #d9d9d9;
    overflow: hidden;
}

.captcha-slider-bg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #1890ff;
    border-radius: 20px 0 0 20px;
    transition: width 0.1s;
}

.captcha-slider-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    user-select: none;
    z-index: 1;
}

/* 滑块按钮 */
.captcha-slider-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: left 0.1s;
}

.captcha-slider-thumb i {
    color: #1890ff;
    font-size: 16px;
}

.captcha-slider-thumb:active {
    cursor: grabbing;
}

/* 成功提示 */
.captcha-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(82, 196, 26, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
    z-index: 30;
    white-space: nowrap;
}

/* ===== 模态框中的小型滑动验证码 ===== */
.captcha-box-mini {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 15px;
}
.captcha-slider-mini {
    position: relative;
    height: 40px;
    background: #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}
.captcha-slider-mini .captcha-slider-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px 0 0 20px;
}
.captcha-slider-mini .captcha-slider-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.captcha-slider-mini .captcha-slider-thumb:active {
    cursor: grabbing;
}
.captcha-tip-mini {
    text-align: center;
    color: #888;
    font-size: 12px;
}

        /* ===== 系统配置页面 ===== */
        .config-container { padding: 20px; }
        .config-tabs { display: flex; gap: 5px; border-bottom: 2px solid #e8e8e8; margin-bottom: 20px; }
        .config-tabs a { padding: 10px 20px; color: #666; text-decoration: none; border-radius: 4px 4px 0 0; transition: all 0.2s; }
        .config-tabs a:hover { color: #1677ff; background: #f0f5ff; }
        .config-tabs a.active { color: #1677ff; background: #fff; border-bottom: 2px solid #1677ff; margin-bottom: -2px; }
        .config-card { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
        .config-card .form-group { margin-bottom: 20px; }
        .config-card label { display: block; font-weight: 500; color: #333; margin-bottom: 8px; }
        .config-card input[type="text"],
        .config-card input[type="number"],
        .config-card textarea,
        .config-card select { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; box-sizing: border-box; }
        .config-card input:focus,
        .config-card textarea:focus,
        .config-card select:focus { outline: none; border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }
        .config-card textarea { min-height: 100px; resize: vertical; }
        .config-card .tip { color: #999; font-size: 12px; margin-top: 4px; }
        .config-card .btn-primary { margin-top: 20px; }
        .config-empty { text-align: center; padding: 60px; color: #999; }

        /* ===== 模板文件列表 ===== */
        .file-list { padding: 20px; }
        .file-item { padding: 12px 15px; border-bottom: 1px solid #eee; display: flex; align-items: center; transition: background 0.2s; }
        .file-item:hover { background: #f5f5f5; }
        .file-icon { margin-right: 12px; color: #666; width: 20px; text-align: center; }
        .file-name { flex: 1; color: #333; font-size: 14px; }
        .file-actions { display: flex; gap: 8px; }
        .file-actions a { color: #2196F3; text-decoration: none; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
        .file-actions a:hover { background: #e3f2fd; }
        .empty-state { text-align: center; padding: 60px 20px; color: #999; }
        .empty-state i { font-size: 48px; margin-bottom: 15px; color: #ddd; }
        .file-count { color: #999; font-size: 12px; margin-left: 10px; }

        /* ===== 模板文件编辑 ===== */
        .editor-container { padding: 20px; }
        .editor-header { margin-bottom: 15px; }
        .editor-form { background: #fff; padding: 20px; border-radius: 8px; }
        .editor-form textarea { width: 100%; min-height: 500px; font-family: 'Consolas', 'Monaco', monospace; font-size: 14px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
        .editor-form .btn-group { margin-top: 15px; }

        /* ===== 上传模板页面 ===== */
        .upload-container { padding: 20px; }
        .upload-form { background: #fff; padding: 30px; border-radius: 8px; max-width: 600px; margin: 0 auto; }
        .upload-area { border: 2px dashed #ddd; padding: 40px; text-align: center; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
        .upload-area:hover { border-color: #2196F3; background: #f0f9ff; }
        .upload-area i { font-size: 48px; color: #999; margin-bottom: 15px; }
        .upload-area p { color: #666; margin: 10px 0; }
        .upload-tips { color: #999; font-size: 12px; margin-top: 20px; }
        .selected-file { margin-top: 20px; padding: 15px; background: #f5f5f5; border-radius: 4px; display: none; }
        .selected-file.show { display: block; }
        .selected-file .file-name { font-weight: bold; color: #333; }
        .upload-form .btn-group { margin-top: 20px; }
        #fileInput { display: none; }

        /* ===== 扫描模板页面 ===== */
        .template-scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 20px; }
        .template-scan-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; }
        .template-scan-card .template-thumb { height: 180px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #999; }
        .template-scan-card .template-thumb img { width: 100%; height: 100%; object-fit: cover; }
        .template-scan-card .template-info { padding: 15px; }
        .template-scan-card .template-info h3 { margin: 0 0 10px; font-size: 16px; }
        .template-scan-card .template-info p { color: #666; font-size: 14px; margin: 0 0 10px; }
        .template-scan-card .template-tags { margin-bottom: 10px; }
        .template-scan-card .template-tags span { display: inline-block; padding: 2px 8px; font-size: 12px; background: #e0e0e0; border-radius: 4px; margin-right: 5px; }
        .template-scan-card .template-tags span.active { background: #4CAF50; color: #fff; }
        .template-scan-card .template-tags span.enabled { background: #2196F3; color: #fff; }
        .template-scan-card .template-actions { margin-top: 10px; }

/* ===== 角色管理表格 ===== */
.role-table-container { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.role-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.role-table th, .role-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #e8e8e8; }
.role-table th { background: #fafafa; font-weight: 600; color: #333; font-size: 14px; }
.role-table tbody tr:hover { background: #f5f5f5; }
.role-table .empty-state { text-align: center; padding: 40px; color: #999; font-size: 14px; }
.role-table td .checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: #1890ff; }

/* ===== 图片上传 ===== */
.image-upload {
    position: relative;
    width: 100%;
    max-width: 300px;
}
.image-preview {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}
.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}
.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
}
.image-remove:hover {
    background: rgba(220, 38, 38, 0.9);
}
.image-upload-area {
    position: relative;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.image-upload-area:hover {
    border-color: #1890ff;
    background: #f0f5ff;
}
.image-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-placeholder {
    color: #999;
}
.upload-placeholder i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: #d9d9d9;
}
.upload-placeholder span {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}
.upload-placeholder small {
    display: block;
    font-size: 12px;
    color: #bbb;
}

/* ===== 表格通用样式 ===== */
/* .header-checkbox and .row-checkbox 样式已在上面的表格Input区域定义，此处已移除重复定义 */

/* ===== 状态徽章 ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.status-badge:hover {
    transform: translateY(-1px);
}

/* 启用状态 - 绿色 */
.status-enabled {
    background: #52c41a;
    color: #fff;
}

.status-enabled:hover {
    background: #73d13d;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}

/* 禁用状态 - 红色 */
.status-disabled {
    background: #ff4d4f;
    color: #fff;
}

.status-disabled:hover {
    background: #ff7875;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);
}

/* ===== 操作按钮组 ===== */
.action-buttons { display: flex; gap: 6px; }
.action-buttons .btn { padding: 4px 8px; font-size: 12px; }

/* ===== 表格卡片样式 ===== */
/* ===== 表格卡片样式 ===== */
.table-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.table-card table { width: 100%; border-collapse: collapse; margin-top: 16px; table-layout: auto; }
.table-card thead { background: #fafafa; }
.table-card th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap; /* 表头不换行 */
}
.table-card td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    white-space: nowrap; /* 内容不换行（时间、数字完美显示） */
}
.table-card tr:hover { background: #fafafa; }
.table-card code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-family: monospace; font-size: 12px; color: #666; }
.table-card strong { color: #333; }

/* ===== 分页样式 ===== */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.pagination span, .pagination a { display: inline-block; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; text-decoration: none; color: #666; transition: all 0.2s; }
.pagination span.current { background: #1890ff; color: #fff; border-color: #1890ff; }
.pagination a:hover { background: #fafafa; border-color: #1890ff; color: #1890ff; }

/* ===== 表格底部信息 ===== */
.table-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.table-info { color: #666; font-size: 14px; }
.table-info strong { color: #333; }

/* ===== 表单字段配置样式 ===== */
.field-list { display: flex; flex-direction: column; gap: 16px; }
.field-item { border: 1px solid #e8e8e8; border-radius: 6px; padding: 16px; background: #fff; }
.field-item:hover { border-color: #d9d9d9; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.field-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.field-number { font-weight: 500; color: #333; }
.field-config { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.config-row { display: flex; flex-direction: column; }
.config-row.full-width { grid-column: 1 / -1; }
.config-row label { font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500; }
.config-row .form-control { width: 100%; }
.config-row textarea.form-control { min-height: 80px; resize: vertical; }
.field-options { grid-column: 1 / -1; background: #fafafa; padding: 12px; border-radius: 4px; border: 1px solid #f0f0f0; }
.config-row input[type="checkbox"] { margin-right: 4px; }

/* 字段配置中的复选框组 */
.field-config .config-row.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.field-config .config-row.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.field-config .config-row.checkbox-group label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1890ff;
    margin: 0;
}

.field-config .config-row.checkbox-group label span {
    user-select: none;
}

/* ===== 模型管理弹窗样式 ===== */
#modelModal {
    display: none;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9999 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    will-change: transform;
}

#modelModal.active {
    display: flex !important;
}

#modelModal .modal-container {
    background: white !important;
    width: 95% !important;
    max-width: 1200px !important;
    max-height: 85vh !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10000 !important;
    margin: auto;
    flex-shrink: 0;
    will-change: transform;
    transform: translateZ(0);
}

#modelModal .modal-header {
   
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#modelModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#modelModal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modelModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#modelModal .modal-body {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    background: #f8f9fa;
    will-change: scroll-position;
    -webkit-overflow-scrolling: auto;
    transform: translateZ(0);
}

#modelModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#modelModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#modelModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
}

#modelModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* GPU加速优化 */
#modelModal,
#modelModal .modal-container,
#modelModal .modal-body,
#modelModal .modal-header,
#modelModal .modal-footer {
    backface-visibility: hidden;
    perspective: 1000px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* 确保按钮和链接可点击 */
a[href], button, .btn, input[type="button"], input[type="submit"] {
    pointer-events: auto !important;
}

/* 确保调试面板不遮挡按钮 */
#think_page_trace {
    pointer-events: none !important;
}

#think_page_trace * {
    pointer-events: auto !important;
}

#modelModal .modal-footer {
    background: white;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

#modelModal .modal-content-wrapper {
    padding: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#modelModal .form-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 确保弹窗中的表单正常显示 */
#modelModal .modal-body .form-card,
#modelModal .modal-body .page-header,
#modelModal .modal-body .tab-container,
#modelModal .modal-body .form-group,
#modelModal .modal-body .field-item {
    display: block !important;
    visibility: visible !important;
}

/* 选项卡内容默认隐藏，只有激活的才显示 */
#modelModal .modal-body .tab-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#modelModal .modal-body .tab-content.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 确保选项卡内容的子元素不会超出容器 */
#modelModal .modal-body .tab-content > * {
    max-width: 100%;
    box-sizing: border-box;
}

#modelModal .modal-body .tab-content form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 选项卡导航样式 - 统一宽度 */
#modelModal .modal-body .tab-nav {
    display: flex;
    border: 2px solid #e9ecef;
    border-bottom: none; /* 去掉下边框 */
    margin: 0 20px 20px;
    background: #f8f9fa;
    padding: 12px 16px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    box-sizing: border-box;
    border-radius: 8px;
    gap: 8px;
}

/* 信息框样式 - 统一宽度 */
#modelModal .modal-body .info-box {
    background: #e7f3ff;
    padding: 16px;
    border-radius: 6px;
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    box-sizing: border-box;
}

/* 字段网格布局 - 统一宽度（和上面完全对齐） */
#modelModal .modal-body .field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 0 20px 20px; /* 左右边距保持一致 */
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    box-sizing: border-box;
    padding: 0;
}
/* 表单组元素宽度控制 */
#modelModal .modal-body .form-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#modelModal .modal-body .form-group input[type="text"],
#modelModal .modal-body .form-group input[type="password"],
#modelModal .modal-body .form-group input[type="email"],
#modelModal .modal-body .form-group input[type="number"],
#modelModal .modal-body .form-group input[type="tel"],
#modelModal .modal-body .form-group input[type="url"],
#modelModal .modal-body .form-group input[type="search"],
#modelModal .modal-body .form-group input[type="date"],
#modelModal .modal-body .form-group input[type="datetime-local"],
#modelModal .modal-body .form-group input[type="time"],
#modelModal .modal-body .form-group select,
#modelModal .modal-body .form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#modelModal .modal-body .tab-item {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: white;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    pointer-events: auto !important;
}

#modelModal .modal-body .tab-item:hover {
    color: #007bff;
    background: #f8f9fa !important;
}

#modelModal .modal-body .tab-item.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
    background: white;
}

#modelModal .modal-body .layout {
    display: block !important;
}

#modelModal .modal-body .content {
    width: 100%;
    padding: 20px;
    max-width: 100%;
}

#modelModal .modal-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

#modelModal .modal-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
    will-change: transform;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== 模型字段样式 ===== */

/* 批量上传容器 */
.batch-upload-container {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background: #f9f9f9;
}

.batch-upload-container .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.batch-upload-container .btn-danger {
    background: #ff4d4f;
    border-color: #ff4d4f;
    color: white;
}

.batch-upload-container .btn-danger:hover {
    background: #ff7875;
    border-color: #ff7875;
}

/* 图片预览网格 */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1;
}

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

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 77, 79, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.image-preview-item .remove-btn:hover {
    background: rgba(255, 77, 79, 1);
}

/* 是/否 单选框容器 —— 左右分布 */
.radio-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* 单选按钮和复选框样式 */
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    margin-bottom: 0;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    margin-bottom: 0;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.radio-label:hover {
    border-color: #1890ff;
    background: #f0f7ff;
}

.checkbox-label:hover {
    color: #1890ff;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    width: 14px;
    height: 14px;
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
    color: #1890ff;
    font-weight: 500;
}

/* 选中后整个按钮高亮 */
.radio-label:has(input:checked) {
    border-color: #1890ff;
    background: #e6f7ff;
}

/* 已有图片预览 */
.existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.existing-images .image-item {
    position: relative;
    display: inline-block;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.existing-images .image-item img {
    max-width: 150px;
    max-height: 150px;
    padding: 5px;
    display: block;
}

.existing-images .image-item .btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
}

/* 批量图片上传容器 */
.batch-image-upload {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background: #f9f9f9;
}

.batch-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.batch-previews .image-item {
    position: relative;
    display: inline-block;
}

.batch-previews .image-item img {
    max-width: 150px;
    max-height: 150px;
    border: 1px solid #e0e0e0;
    padding: 5px;
    border-radius: 4px;
}

/* 图片预览 */
.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* 模型字段容器 */
.model-fields-container {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.model-fields-container h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.model-fields-container h3 i {
    margin-right: 8px;
    color: #666;
}

/* 模型编辑器 */
.model-editor {
    width: 100%;
    height: 300px;
}

/* ===== 文章页面样式 ===== */

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #52c41a;
}

.toast-error {
    background-color: #ff4d4f;
}

/* 成功提示框样式 */
.success-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 30px 40px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 320px;
}

.success-dialog.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.success-dialog-icon {
    font-size: 48px;
    color: #52c41a;
    margin-bottom: 15px;
}

.success-dialog-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
}

.success-dialog-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.success-dialog-btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.success-dialog-btn-primary {
    background: #1677ff;
    color: #fff;
}

.success-dialog-btn-primary:hover {
    background: #0958d9;
}

.success-dialog-btn-default {
    background: #f5f5f5;
    color: #666;
}

.success-dialog-btn-default:hover {
    background: #e8e8e8;
}

/* 遮罩层 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 特殊复选框样式 */
.source-check,
.position-check {
    width: 14px;
    height: 14px;
}

/* 文件信息 */
.file-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* ===== 角色管理 - 权限树选择 ===== */
.auth-tree-select {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}
.auth-group {
    margin-bottom: 12px;
}
.auth-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.auth-group-title:hover {
    background: #e9ecef;
}
.auth-group-title input {
    margin: 0;
}
.auth-group-title label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}
.toggle-icon {
    font-size: 12px;
    color: #666;
    width: 16px;
    text-align: center;
}
.auth-items {
    display: none;
    padding: 8px 8px 8px 32px;
}
.auth-items.show {
    display: block;
}
.auth-item-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}
.auth-item-select input {
    margin: 0;
}

/* ===== 模型管理 - 字段编辑 ===== */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}
.tab-item {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}
.tab-item.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.field-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}
.field-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    gap: 10px;
}
.field-number {
    font-weight: 600;
    color: #666;
}
.field-config {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.config-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.config-row label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
.config-row.full-width {
    grid-column: 1 / -1;
}
.checkbox-group {
    flex-direction: row;
    gap: 20px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.field-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
}
.field-operations-bar {
    display: flex;
    gap: 8px;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ===== Styles from view/admin/form/edit.html ===== */
/* 紧凑布局样式 */
.content { padding: 16px !important; }
.form-card { padding: 16px !important; }
.page-header { margin-bottom: 16px !important; padding-bottom: 12px !important; }
.page-title { font-size: 18px !important; }

/* 标签导航紧凑化 */
.tab-nav { margin-bottom: 12px !important; padding-bottom: 0 !important; }
.tab-item { padding: 8px 16px !important; font-size: 13px !important; }

/* 表单字段紧凑化 */
.form-group { margin-bottom: 12px !important; }
.form-group label { font-size: 13px !important; margin-bottom: 4px !important; }
.form-control { padding: 6px 10px !important; font-size: 13px !important; }
textarea.form-control { min-height: 60px !important; }

/* 字段配置紧凑化 */
.field-item { padding: 12px !important; margin-bottom: 12px !important; }
.field-header { margin-bottom: 8px !important; padding-bottom: 6px !important; }
.field-config { gap: 8px !important; }
.config-row { margin-bottom: 6px !important; }
.config-row label { font-size: 12px !important; margin-bottom: 3px !important; }

/* 按钮紧凑化 */
.btn { padding: 6px 12px !important; font-size: 13px !important; }
.btn-sm { padding: 4px 8px !important; font-size: 12px !important; }

/* 选项配置紧凑化 */
.field-options { padding: 8px !important; }
.field-options textarea { min-height: 60px !important; }

/* 标签内容间距 */
.tab-content { padding-top: 8px !important; }

/* 按钮组紧凑化 */
.btn-group { margin-top: 16px !important; gap: 8px !important; }

/* 字段配置复选框组紧凑化 */
.checkbox-group { gap: 12px !important; }
.checkbox-group label span { font-size: 12px !important; }

/* 字段配置区域优化 */
.field-operations {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.field-operations .btn {
    padding: 6px 14px !important;
}

.field-item {
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    margin-bottom: 16px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.field-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #adb5bd !important;
}

.field-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 10px 12px !important;
}

.field-number {
    font-size: 14px !important;
    font-weight: 600;
    color: #495057;
}

.field-operations-bar {
    display: flex;
    gap: 6px;
}

.field-operations-bar .btn {
    padding: 4px 10px !important;
    font-size: 12px !important;
}

.field-config {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
}

.config-row {
    display: flex !important;
    flex-direction: column !important;
}

.config-row label {
    font-size: 12px !important;
    color: #6c757d !important;
    margin-bottom: 4px !important;
    font-weight: 500;
}

.field-options {
    grid-column: 1 / -1 !important;
    background: #f8f9fa !important;
    padding: 10px !important;
    border-radius: 4px !important;
    border: 1px solid #e9ecef !important;
}

.field-options label {
    font-size: 12px !important;
    color: #495057 !important;
    margin-bottom: 6px !important;
    font-weight: 600;
}

/* ===== Styles from view/admin/form/create.html ===== */
/* 紧凑布局样式 */
.content { padding: 16px !important; }
.form-card { padding: 16px !important; }
.page-header { margin-bottom: 16px !important; padding-bottom: 12px !important; }
.page-title { font-size: 18px !important; }

/* 标签导航紧凑化 */
.tab-nav { margin-bottom: 12px !important; padding-bottom: 0 !important; }
.tab-item { padding: 8px 16px !important; font-size: 13px !important; }

/* 表单字段紧凑化 */
.form-group { margin-bottom: 12px !important; }
.form-group label { font-size: 13px !important; margin-bottom: 4px !important; }
.form-control { padding: 6px 10px !important; font-size: 13px !important; }
textarea.form-control { min-height: 60px !important; }

/* 字段配置紧凑化 */
.field-item { padding: 12px !important; margin-bottom: 12px !important; }
.field-header { margin-bottom: 8px !important; padding-bottom: 6px !important; }
.field-config { gap: 8px !important; }
.config-row { margin-bottom: 6px !important; }
.config-row label { font-size: 12px !important; margin-bottom: 3px !important; }

/* 按钮紧凑化 */
.btn { padding: 6px 12px !important; font-size: 13px !important; }
.btn-sm { padding: 4px 8px !important; font-size: 12px !important; }

/* 选项配置紧凑化 */
.field-options { padding: 8px !important; }
.field-options textarea { min-height: 60px !important; }

/* 标签内容间距 */
.tab-content { padding-top: 8px !important; }

/* 按钮组紧凑化 */
.btn-group { margin-top: 16px !important; gap: 8px !important; }

/* 字段配置复选框组紧凑化 */
.checkbox-group { gap: 12px !important; }
.checkbox-group label span { font-size: 12px !important; }

/* 字段配置区域优化 */
.field-operations {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.field-operations .btn {
    padding: 6px 14px !important;
}

.field-item {
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    margin-bottom: 16px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.field-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #adb5bd !important;
}

.field-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 10px 12px !important;
}

.field-number {
    font-size: 14px !important;
    font-weight: 600;
    color: #495057;
}

.field-operations-bar {
    display: flex;
    gap: 6px;
}

.field-operations-bar .btn {
    padding: 4px 10px !important;
    font-size: 12px !important;
}

.field-config {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
}

.config-row {
    display: flex !important;
    flex-direction: column !important;
}

.config-row label {
    font-size: 12px !important;
    color: #6c757d !important;
    margin-bottom: 4px !important;
    font-weight: 500;
}

.field-options {
    grid-column: 1 / -1 !important;
    background: #f8f9fa !important;
    padding: 10px !important;
    border-radius: 4px !important;
    border: 1px solid #e9ecef !important;
}

.field-options label {
    font-size: 12px !important;
    color: #495057 !important;
    margin-bottom: 6px !important;
    font-weight: 600;
}

.field-empty {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
    font-size: 14px;
}

/* ===== Styles from view/admin/template/upload.html ===== */
.upload-container { padding: 20px; }
.upload-form { background: #fff; padding: 30px; border-radius: 8px; max-width: 600px; margin: 0 auto; }
.upload-area { border: 2px dashed #ddd; padding: 40px; text-align: center; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.upload-area:hover { border-color: #2196F3; background: #f0f9ff; }
.upload-area i { font-size: 48px; color: #999; margin-bottom: 15px; }
.upload-area p { color: #666; margin: 10px 0; }
.upload-tips { color: #999; font-size: 12px; margin-top: 20px; }
.selected-file { margin-top: 20px; padding: 15px; background: #f5f5f5; border-radius: 4px; display: none; }
.selected-file.show { display: block; }
.file-name { font-weight: bold; color: #333; }

/* ===== Styles from view/admin/profile.html ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert i {
    font-size: 18px;
}

/* ===== Styles from view/admin/password.html ===== */
.password-form {
    max-width: 500px;
    margin: 0 auto;
}
.form-tips {
    background: #e7f3ff;
    border: 1px solid #1890ff;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #666;
}
.form-tips i {
    color: #1890ff;
    margin-right: 8px;
}

/* ===== Styles from view/admin/article/preview.html ===== */
.preview-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.preview-header {
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.preview-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.preview-meta {
    color: #666;
    font-size: 14px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.preview-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.preview-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}

.preview-content video {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
}

.model-fields-section {
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.model-fields-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.model-field-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.model-field-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.model-field-value {
    color: #333;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
}

.status-hidden {
    background: #fff3cd;
    color: #856404;
}

/* ===== Styles from view/admin/error/no_auth.html ===== */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px;
}
.error-icon {
    font-size: 80px;
    color: #ff4d4f;
    margin-bottom: 20px;
}
.error-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}
.error-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}
.error-actions {
    display: flex;
    gap: 15px;
}
.btn {
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}
.btn-primary {
    background: #1890ff;
    color: #fff;
}
.btn-primary:hover {
    background: #40a9ff;
}
.btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}
.btn-default:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* ===== 版权信息 ===== */
.admin-footer {
    text-align: center;
    padding: 15px 20px;
    color: #999;
    font-size: 13px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
    margin-top: 20px;
}