/* ======================== LayUI风格样式重设计 ======================== */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======================== 模态框交互：打开时隐藏页脚 ======================== */
/* 在显示 Bootstrap 模态框期间，隐藏底部页脚，避免与遮罩层叠加造成视觉干扰 */
body.modal-open footer {
    display: none !important;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ======================== 头部样式 ======================== */
.header {
    background: #1890ff;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.header .logo {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .user-info span {
    color: #fff;
    font-size: 14px;
}

.header .logout {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.header .logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ======================== 容器布局 ======================== */
/* 取消对 Bootstrap .container 的全局覆盖，改用局部类 */
.layout-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* ======================== 侧边栏样式 ======================== */
.sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 10px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

/* 侧边栏菜单分组样式 */
.menu-group {
    margin-bottom: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.menu-group:hover {
    border-left-color: #1890ff;
    background: #f8f9fa;
}

.menu-group-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.menu-group-header:hover {
    background-color: #f0f5ff;
    color: #1890ff;
}

.menu-group-header.active {
    background-color: #e6f7ff;
    color: #1890ff;
    font-weight: 600;
}

/* 图标样式 */
.menu-item i,
.menu-group-header i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 展开/收起图标 */
.icon-expand {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-group.collapsed .icon-expand {
    transform: rotate(-90deg);
}

.menu-group-content {
    padding-left: 20px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-group.collapsed .menu-group-content {
    max-height: 0;
    padding-left: 0;
}

/* 菜单项样式 */
.menu-item {
    padding: 4px 15px;
    margin-bottom: 2px;
}

.menu-item a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item a:hover {
    background: #f0f5ff;
    color: #1890ff;
}

.menu-item.active a {
    background: #e6f7ff;
    color: #1890ff;
    font-weight: 500;
}

/* ======================== 主内容区样式 ======================== */
.main-content {
    flex: 1;
    padding: 20px;
    background: #f5f7fa;
    overflow-y: auto;
    margin-left: 240px;
}

.content-wrapper {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* 页面标题样式 */
.page-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #1890ff;
    display: inline-block;
}

/* ======================== 卡片样式 ======================== */
.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    background: #fafafa;
}

.card-body {
    padding: 20px;
}

/* ======================== 表单样式 ======================== */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* 筛选表单行 */
.filter-row-full {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 15px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
    min-width: 120px;
}

.form-group-sm {
    flex: 0 0 auto;
    min-width: 120px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-group-sm label {
    font-size: 13px;
    margin-bottom: 4px;
    color: #666;
    font-weight: 500;
}

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #fff;
}

.form-group-sm input[type="text"],
.form-group-sm input[type="date"],
.form-group-sm select {
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    height: 32px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group input:hover,
.form-group select:hover {
    border-color: #40a9ff;
}

.form-group .error {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 按钮组样式 */
.form-group-flex {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 0;
}

/* ======================== 按钮样式 ======================== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    height: 36px;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* 小尺寸按钮 */
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    height: 28px;
    min-width: 60px;
}

/* 超小尺寸按钮 */
.btn-xs {
    padding: 2px 6px;
    font-size: 11px;
    height: 24px;
    min-width: 50px;
}

/* 按钮颜色样式 */
.btn-primary {
    background: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-success {
    background: #52c41a;
    color: #fff;
    border: 1px solid #52c41a;
}

.btn-success:hover {
    background: #73d13d;
    border-color: #73d13d;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
    border: 1px solid #ff4d4f;
}

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

.btn-warning {
    background: #faad14;
    color: #fff;
    border: 1px solid #faad14;
}

.btn-warning:hover {
    background: #ffc53d;
    border-color: #ffc53d;
}

.btn-info {
    background: #1890ff;
    color: #fff;
    border: 1px solid #1890ff;
}

.btn-info:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.btn-default {
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
}

.btn-default:hover {
    background: #f5f5f5;
    border-color: #40a9ff;
    color: #1890ff;
}

/* ======================== 表格样式 ======================== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

.table-hover tbody tr:hover {
    background: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #fbfbfb;
}

/* 复选框列样式 */
th.checkbox-col, 
td.checkbox-col,
th:first-child,
td:first-child {
    width: 40px;
    text-align: center;
    padding: 8px 4px;
}

/* 操作列样式 */
td:last-child {
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
}

/* ======================== 操作按钮样式 ======================== */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 4px;
    border-radius: 8px;
    border: none;
    color: #fff;
    background: #6c757d;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    cursor: pointer;
}
.action-btn i { font-size: 14px; }
.action-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.action-btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.action-btn[disabled], .action-btn.disabled { opacity: .6; cursor: not-allowed; }

/* 颜色变体：与图3一致的方形彩色按钮 */
.action-btn.btn-view { background: #1e90ff; }
.action-btn.btn-view:hover { background: #1878d6; }
.action-btn.btn-edit { background: #28a745; }
.action-btn.btn-edit:hover { background: #218838; }
.action-btn.btn-delete { background: #dc3545; }
.action-btn.btn-delete:hover { background: #c82333; }
.action-btn.btn-copy { background: #6f42c1; }
.action-btn.btn-copy:hover { background: #5a36a1; }
.action-btn.btn-default { background: #6c757d; }
.action-btn.btn-default:hover { background: #5a6268; }

.btn-view {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-view:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

.btn-edit {
    background: #52c41a;
    color: #fff;
    border-color: #52c41a;
}

.btn-edit:hover {
    background: #73d13d;
    border-color: #73d13d;
}

.btn-delete {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.btn-delete:hover {
    background: #ff7875;
    border-color: #ff7875;
}

.btn-copy {
    background: #722ed1;
    color: #fff;
    border-color: #722ed1;
}

.btn-copy:hover {
    background: #9254de;
    border-color: #9254de;
}

/* ======================== 按钮文案开/关切换 ======================== */
/* 开启文案：在 action-btn 后追加 title 文案 */
body.btn-labels-on .action-btn::after {
    content: attr(title);
    margin-left: 6px;
    font-size: 12px;
    line-height: 1;
    color: inherit;
}
/* 开启文案时，适度加宽 */
body.btn-labels-on .action-btn {
    min-width: 90px;
    padding: 4px 10px;
}
/* 仅图标模式：缩小为紧凑方形按钮 */
body.buttons-icon-only .action-btn {
    min-width: 32px;
    width: 32px;
    padding: 0;
}
/* 仅图标模式：图标居中，无额外间距 */
body.buttons-icon-only .action-btn i {
    margin: 0;
}

/* ======================== 状态标签样式 ======================== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

.badge-success,
.bg-success {
    background-color: #52c41a;
    color: #fff;
}

.badge-danger,
.bg-danger {
    background-color: #ff4d4f;
    color: #fff;
}

.badge-warning,
.bg-warning {
    background-color: #faad14;
    color: #fff;
}

.badge-info,
.bg-info {
    background-color: #1890ff;
    color: #fff;
}

.badge-secondary,
.bg-secondary {
    background-color: #6c757d;
    color: #fff;
}

.badge-primary,
.bg-primary {
    background-color: #1890ff;
    color: #fff;
}

/* ======================== 分页样式 ======================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 6px;
    text-decoration: none;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #333;
    background: #fff;
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination .current {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ======================== Bootstrap模态框样式增强 ======================== */
/* 使用Bootstrap默认模态框，只添加一些样式增强 */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    color: #999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.close:hover {
    color: #333;
    background: #f5f5f5;
}

/* ======================== 提示信息样式 ======================== */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
}

.alert-success {
    color: #389e0d;
    background-color: #f6ffed;
    border-color: #b7eb8f;
}

.alert-danger {
    color: #cf1322;
    background-color: #fff2f0;
    border-color: #ffccc7;
}

.alert-warning {
    color: #d48806;
    background-color: #fffbe6;
    border-color: #ffe58f;
}

.alert-info {
    color: #0958d9;
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

/* ======================== 复选框样式优化 ======================== */
.form-check-input {
    margin-right: 0;
    margin-left: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.form-check-input:checked {
    background-color: #1890ff;
    border-color: #1890ff;
}

.form-check-input:hover {
    border-color: #40a9ff;
}

/* ======================== 响应式设计 ======================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar .nav-link {
        padding: 0.5rem;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ======================== 工具类样式 ======================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: #1890ff; }
.text-success { color: #52c41a; }
.text-danger { color: #ff4d4f; }
.text-warning { color: #faad14; }
.text-info { color: #1890ff; }
.text-muted { color: #999; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
/* 字体尺寸提升一个档位（相对全局14px提高到16px） */
.fs-up-1 { font-size: 16px; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }

/* ======================== 动画效果 ======================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in-down {
    animation: slideInDown 0.3s ease;
}

/* ======================== 滚动条样式 ======================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ======================== 底部状态栏样式 ======================== */
footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 10px 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: auto;
}

/* ======================== 统计卡片彩色主题 ======================== */
.stat-card { border: none; border-radius: 10px; color: #fff; overflow: hidden; }
.stat-card .stat-content { display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-number { font-size: 24px; font-weight: 700; }
.stat-card .stat-label { font-size: 14px; opacity: 0.9; }
.stat-card .stat-icon { opacity: 0.3; font-size: 36px; }
.stat-card .stat-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; }
.stat-card .stat-link { color: #fff; text-decoration: none; }
.stat-card .stat-link:hover { text-decoration: none; }

/* 主题色阶（与LayUI风格协调） */
.stat-card-primary { background: linear-gradient(135deg, #1E9FFF 0%, #1890ff 100%); }
.stat-card-info { background: linear-gradient(135deg, #01AAED 0%, #17a2b8 100%); }
.stat-card-warning { background: linear-gradient(135deg, #FFB800 0%, #ff9800 100%); color: #333; }
.stat-card-success { background: linear-gradient(135deg, #5FB878 0%, #28a745 100%); }
.stat-card-danger { background: linear-gradient(135deg, #FF5722 0%, #dc3545 100%); }

/* ======================== 后台链接统一去下划线 ======================== */
.main-content a, .layui-card a, .sidebar .nav-link, .dropdown-menu .dropdown-item { text-decoration: none !important; }
.main-content a:hover, .layui-card a:hover, .sidebar .nav-link:hover, .dropdown-menu .dropdown-item:hover { text-decoration: none !important; }
/* 通用规则（防止个别场景仍显示下划线） */
a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ======================== 导航栏右侧链接样式 ======================== */
.navbar-nav .nav-item.d-flex {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row;
}

.navbar-nav .nav-item.d-flex .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar-nav .nav-item.d-flex .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 确保导航栏在所有情况下都正确对齐 */
.navbar-nav {
    align-items: center;
}

.navbar-collapse {
    justify-content: space-between;
}

/* 响应式设计 - 移动端 */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item.d-flex {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .navbar-nav .nav-item.d-flex .nav-link {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ======================== 顶部导航统一风格（前台） ======================== */
.topbar {
    background: #1890ff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 32px; /* 调整为 32px */
    position: sticky;
    top: 0;
    z-index: 1030; /* 保证导航及其下拉在页面顶层显示 */
    padding-left: 0; /* 去除左右内边距，保证内容贴边 */
    padding-right: 0;
}

.topbar .navbar-brand {
    color: #fff;
    font-weight: 600;
}

.topbar .navbar-brand:hover { color: #e6f7ff; }

.topbar .nav-link {
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.topbar .nav-link:hover,
.topbar .nav-link.active { 
    color: #fff; 
    background-color: #40a9ff; 
}

.topbar .dropdown-menu { 
    border: 1px solid #f0f0f0; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.08); 
    z-index: 1050; /* 提高下拉层级，避免被内容区遮挡 */
    list-style: none; /* 移除项目符号 */
    padding: .5rem 0; /* 更舒适的上下间距 */
    border-radius: 8px; /* 圆角美化 */
    min-width: 200px; /* 调减20px宽度 */
}

/* 右侧对齐的下拉在靠近页面边界时向左微移，避免越界 */
.topbar .dropdown-menu.dropdown-menu-end { margin-right: 0; }
.topbar .dropdown-menu[data-bs-popper] { transform: none !important; }

/* 更精确：仅对用户名菜单强制右对齐并取消 Popper 的位移，彻底避免越界 */
.topbar .dropdown-menu[aria-labelledby="userDropdown"] { left: auto !important; right: 8px !important; margin-right: 0 !important; }
.topbar .dropdown-menu[aria-labelledby="userDropdown"][data-bs-popper] { left: auto !important; right: 8px !important; transform: none !important; }

/* 未登录首页导航行：高度翻倍与背景蓝色，并美化四个链接 */
.topbar-row {
    min-height: 32px; /* 与顶栏高度一致 */
    background-color: #1890ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.topbar .navbar-brand,
.topbar .nav-link {
    color: #fff !important; /* 与蓝色背景形成对比 */
}

.topbar .navbar-brand {
    font-weight: 600;
    margin-right: 1rem;
}

.topbar .nav-link {
    padding: .15rem .75rem; /* 更小垂直内边距，贴近 32px 高度需求 */
    border-radius: .375rem;
    transition: background-color .2s ease, opacity .2s ease;
}

.topbar .nav-link:hover,
.topbar .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.topbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}
.topbar .dropdown-item { padding: 0.5rem 0.75rem; }
.topbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.topbar .dropdown-item:hover {
    background-color: #f5f9ff;
}
.topbar .dropdown-header {
    font-weight: 600;
    color: #595959;
    padding: .25rem .75rem;
}
.topbar .dropdown-divider {
    margin: .5rem 0;
}
.topbar .navbar-toggler { border-color: #d9d9d9; }
.topbar .navbar-toggler-icon { filter: invert(1); }

/* ===== 统一分页组件：更紧凑、统一的按钮与输入样式 ===== */
.pagination {
  gap: 6px;
}
.pagination .page-link {
  padding: 4px 8px;
  min-width: 32px;
  border-radius: 6px;
  font-size: 14px;
}
.pagination .page-item.disabled .page-link {
  color: #adb5bd;
}
.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}
.pagination + form .form-control-sm {
  width: 72px !important;
  padding: 4px 8px;
}
.pagination + form .btn.btn-sm {
  padding: 4px 10px;
}
