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

body {
    font-family: 
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "PingFang SC",
            "Hiragino Sans GB",
            "Microsoft YaHei",
            "Helvetica Neue",
            Helvetica,
            Arial,
            sans-serif,
            "Apple Color Emoji",
            "Segoe UI Emoji",
            "Segoe UI Symbol";
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
    font-size: 14px; /* 整体字体缩小一点 */
}

/* ===== 新布局结构 ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== 左侧导航栏 ===== */
.left-sidebar {
    width: 256px;
    background-color: #001529;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 导航栏品牌LOGO - 去掉横线分割 */
.sidebar-brand {
    padding: 28px 24px 24px 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 60px; /* 固定高度，与顶部导航栏对齐 */
    position: relative;
}

.sidebar-brand i {
    font-size: 24px; /* 缩小LOGO图标 */
    color: #42b983;
    position: absolute;
    left: 20px; /* 固定左侧位置 */
}

.brand-text {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease; /* 添加文字透明度过渡 */
    margin-left: 12px; /* 为图标预留空间 */
}

.brand-text .brand-name {
    font-size: 20px; /* 缩小字体 */
    font-weight: 550;
    color: white;
}

.brand-text .brand-subtitle {
    font-size: 11px; /* 缩小字体 */
    opacity: 0.7;
    margin-top: 2px;
}

/* 导航菜单 */
.sidebar-menu {
    flex: 1;
    padding: 24px 0; /* 减少内边距 */
    overflow-y: auto;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
    margin-bottom: 10px; /* 减少间距 */
}

.nav-link {
    color: #bdc3c7;
    padding: 10px 20px; /* 调整内边距 */
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
    font-size: 13px; /* 缩小字体 */
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

/* 修改选中背景为蓝色 */
.nav-link.active {
    color: white;
    background-color: #1890ff !important; /* 蓝色背景 */
    border-left-color: #1890ff;
}

.nav-link.active:before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #1890ff;
}

.nav-link i {
    width: 20px; /* 增加宽度保持对齐 */
    text-align: center;
    font-size: 16px; /* 缩小图标 */
    position: absolute;
    left: 20px; /* 固定左侧位置 */
}

.nav-link span {
    transition: opacity 0.3s ease; /* 添加文字透明度过渡 */
    white-space: nowrap; /* 防止文字换行 */
    margin-left: 28px; /* 为图标预留空间 */
}

/* 收缩状态下的导航栏 - 修复位置问题 */
.left-sidebar.collapsed {
    width: 80px !important; /* 收缩后的宽度，更窄 */
}

.left-sidebar.collapsed .brand-text,
.left-sidebar.collapsed .nav-link span {
    opacity: 0; /* 隐藏文字 */
    width: 0;
    overflow: hidden;
    margin-left: 0; /* 移除边距 */
}

/* 收缩状态下保持LOGO和图标位置不变（左对齐） */
.left-sidebar.collapsed .sidebar-brand {
    padding: 28px 24px 24px 24px; /* 保持内边距不变 */
    justify-content: center; /* 图标居中显示 */
}

.left-sidebar.collapsed .sidebar-brand i {
    position: static; /* 取消绝对定位 */
    margin: 0; /* 清除边距 */
}

.left-sidebar.collapsed .brand-text {
    display: none; /* 完全隐藏文字 */
}

.left-sidebar.collapsed .nav-link {
    padding: 10px; /* 调整内边距 */
    justify-content: center; /* 图标居中显示 */
}

.left-sidebar.collapsed .nav-link i {
    position: static; /* 取消绝对定位 */
    margin: 0; /* 清除边距 */
}

/* 添加自动收缩的特定样式类 */
.left-sidebar.auto-collapsed {
    /* 可以添加一些视觉提示，比如不同的背景色或边框 */
    background-color: rgba(0, 21, 41, 0.95);
}

/* 当侧边栏是自动收缩状态时，在收缩按钮上添加提示 */
.menu-toggle-btn.auto-collapsed::after {
    content: 'A';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: #42b983;
    font-weight: bold;
}

/* ===== 右侧主内容区域 ===== */
.main-content-area {
    flex: 1;
    margin-left: 256px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease; /* 添加过渡效果 */
    width: 100%;
    overflow-x: hidden;
}

/* 当导航栏收缩时，调整主内容区域 */
.left-sidebar.collapsed ~ .main-content-area {
    margin-left: 80px !important; /* 与收缩后的导航栏宽度一致 */
}

/* ===== 顶部导航栏（白色） ===== */
.top-navbar {
    background-color: white;
    color: #333;
    height: 60px;
    box-shadow: 0 0px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    flex-shrink: 0;
}

.top-navbar .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    min-width: 0; /* 允许缩小 */
}

/* 左侧菜单按钮区域 */
.navbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

/* 菜单切换按钮 - 永久显示 */
.menu-toggle-btn {
    background: none;
    border: none;
    color: #001529;
    font-size: 18px; /* 缩小图标 */
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
}

.user-info .dropdown-toggle {
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.3s;
    color: #001529;
    text-decoration: none;
}

.user-info .dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 30px; /* 缩小头像 */
    height: 30px; /* 缩小头像 */
    border-radius: 50%;
    background-color: #42b983;
    font-size: 18px; /* 缩小图标 */
    margin-right: 6px; /* 减少间距 */
}

.user-details .user-name {
    font-size: 12px; /* 缩小字体 */
    font-weight: 500;
}

.user-details .user-role {
    font-size: 11px; /* 缩小字体 */
    opacity: 0.8;
}

/* 下拉菜单样式 */
.user-info .dropdown-menu {
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 13px; /* 缩小字体 */
}

.user-info .dropdown-item {
    color: #333;
    padding: 6px 12px; /* 减少内边距 */
}

.user-info .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #333;
}

.user-info .dropdown-item.text-danger {
    color: #dc3545 !important;
}

.user-info .dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* ===== 主内容区域 ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
}

/* ===== 页面头部 ===== */
.page-header {
    background-color: white;
    padding: 15px 20px; /* 减少内边距 */
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px; /* 减少外边距 */
}

.page-title {
    font-size: 20px; /* 缩小字体 */
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 8px; /* 减少间距 */
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ===== 页面内容 ===== */
.page-content {
    padding: 15px; /* 减少内边距 */
    min-height: calc(100vh - 250px); /* 考虑页头和页脚高度 */
    overflow: visible;
}

/* ===== 页脚样式 ===== */
/* 在body或最外层容器上设置flex布局 */
.app-container {
    display: flex;
    min-height: 100vh; /* 确保容器至少占满整个视口高度 */
}

/* 让main-content-area占据剩余空间 */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 让main-content部分占据剩余空间并自动增长 */
.main-content {
    flex: 1; /* 这个flex:1是关键，让内容区域自动填充剩余空间 */
    display: flex;
    flex-direction: column;
}

/* 让page-content占据剩余空间 */
.page-content {
    flex: 1;
}

/* 页脚样式 */
.page-footer {
    background: transparent;
    padding: 15px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
    border: none;
}

/* ===== 面包屑导航样式 ===== */
.breadcrumb-nav {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    padding: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: #40a9ff;
    text-decoration: underline;
}

.breadcrumb-nav .separator {
    margin: 0 6px;
    color: #adb5bd;
}

.breadcrumb-nav .current-page {
    color: #495057;
    font-weight: 500;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .left-sidebar {
        position: fixed;
        top: 0;
        left: -256px;
        width: 256px !important; /* 固定宽度，不受collapsed类影响 */
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1100;
    }
    
    .left-sidebar.show {
        left: 0;
    }
    
    /* 移动端下完全重置collapsed类的影响 */
    .left-sidebar.collapsed,
    .left-sidebar:not(.collapsed) {
        width: 256px !important;
        left: -256px;
    }
    
    .left-sidebar.collapsed.show,
    .left-sidebar:not(.collapsed).show {
        left: 0;
        width: 256px !important;
    }
    
    /* 移动端下强制显示所有文字 */
    .left-sidebar .brand-text,
    .left-sidebar .nav-link span {
        opacity: 1 !important;
        visibility: visible !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        margin-left: 30px !important; /* 确保文字在图标右侧 */
    }
    
    /* 移动端下重置品牌区域布局 */
    .left-sidebar .sidebar-brand {
        justify-content: flex-start !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .left-sidebar .sidebar-brand i {
        position: static !important;
        margin: 0 !important;
    }
    
    /* 移动端下重置导航链接布局 */
    .left-sidebar .nav-link {
        justify-content: flex-start !important;
        padding: 10px 20px !important;
    }
    
    .left-sidebar .nav-link i {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin-right: 0 !important;
        font-size: 16px !important;
    }
    
    /* 移动端下隐藏自动收缩提示 */
    .menu-toggle-btn.auto-collapsed::after {
        display: none;
    }
    
    .main-content-area {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* 移动端遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1099;
    }
    
    .sidebar-overlay.show {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    /* 调整顶部导航栏在移动端的样式 */
    .top-navbar .container-fluid {
        padding: 0 15px;
    }
    
    .page-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    /* 移动端下菜单按钮位置调整 */
    .navbar-left {
        flex: 1;
    }
    
    .menu-toggle-btn {
        margin-right: 10px;
    }
    
    .user-info {
        flex-shrink: 0;
    }
    
    /* 修复用户下拉菜单在移动端的位置 */
    .user-info .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
    }
    
    /* 调整面包屑导航 */
    .breadcrumb-nav {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    /* 移动端下隐藏用户详细信息 */
    .user-details {
        display: none !important;
    }
}

/* 遮罩层动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 卡片样式 ===== */
.card {
    background: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 12px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px; /* 减少内边距 */
    border-radius: 10px 10px 0 0;
    font-size: 14px; /* 缩小字体 */
}

.card-body {
    padding: 15px; /* 减少内边距 */
}

/* ===== 表格样式 ===== */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 13px; /* 缩小字体 */
    width: 100%;
    max-width: 100%;
    table-layout: auto; /* 改为自动布局，而不是固定布局 */
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #2c3e50;
    padding: 10px 12px; /* 减少内边距 */
}

.table tbody td {
    padding: 10px 12px; /* 减少内边距 */
    vertical-align: middle;
}

/* 鼠标悬停效果 */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 确保表格容器在任何情况下都有正确的行为 */
.table-responsive {
    -webkit-overflow-scrolling: touch; /* 平滑滚动 */
    overflow-x: auto;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* 在狭窄屏幕上，为特定列添加最小宽度 */
.table th:nth-child(1),
.table td:nth-child(1) {
    min-width: 80px; /* ID列 */
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 150px; /* 名称列 */
}

.table th:nth-child(3),
.table td:nth-child(3) {
    min-width: 120px; /* 状态列 */
}

/* 添加水平滚动提示（可选） */
.table-responsive {
    position: relative;
}

.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.table-responsive.scrolling::after {
    opacity: 1;
}

/* ===== 按钮样式 ===== */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 6px 12px; /* 减少内边距 */
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 13px; /* 缩小字体 */
    height: 36px; /* 统一高度 */
    line-height: 1.5; /* 统一行高 */
    padding: 0.3rem 0.6rem; /* 与输入框相同的padding */
    display: inline-flex; /* 使用flex布局确保内容垂直居中 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

.btn i {
    font-size: 14px; /* 缩小图标 */
    line-height: 1; /* 图标单独的行高，不影响按钮整体 */
}

.btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s;
}

.btn-primary {
    background-color: #2c3e50;
    border-color: #2c3e50;
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
}

.btn-success {
    background-color: #42b983;
    border-color: #42b983;
}

.btn-success:hover {
    background-color: #389c6f;
    border-color: #389c6f;
}

.btn-outline-primary {
    color: #2c3e50;
    border-color: #2c3e50;
}

.btn-outline-primary:hover {
    background-color: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

/* 按钮尺寸 */
.btn-sm {
    height: 30px; /* 缩小高度 */
    line-height: 1.5; /* 统一行高 */
    font-size: 0.8rem; /* 缩小字体 */
    padding: 0.2rem 0.4rem; /* 与小尺寸输入框相同的padding */
}

.btn-lg {
    height: 44px; /* 缩小高度 */
    line-height: 1.5; /* 统一行高 */
    font-size: 1.1rem; /* 缩小字体 */
    padding: 0.4rem 0.8rem; /* 与大尺寸输入框相同的padding */
}

/* 按钮组中的按钮高度调整 */
.btn-group .btn,
.btn-group-vertical .btn {
    height: 36px; /* 与标准高度一致 */
}

.btn-group-sm .btn,
.btn-group-vertical.btn-group-sm .btn {
    height: 30px; /* 与小尺寸高度一致 */
}

.btn-group-lg .btn,
.btn-group-vertical.btn-group-lg .btn {
    height: 44px; /* 与大尺寸高度一致 */
}

/* 修复按钮组中按钮边框重叠问题 */
.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) {
    margin-left: -1px; /* Bootstrap默认值，保持一致性 */
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ===== 状态徽章 ===== */
.badge {
    padding: 4px 8px; /* 减少内边距 */
    border-radius: 5px;
    font-size: 12px; /* 缩小字体 */
    font-weight: 500;
}

.bg-success {
    background-color: #42b983 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

/* ===== 表单控件 ===== */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 6px 10px; /* 减少内边距 */
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 13px; /* 缩小字体 */
    height: 36px; /* 统一高度 */
    line-height: 1.5;
    max-width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.25);
}

/* 小尺寸表单控件 */
.form-control-sm,
.form-select-sm {
    height: 30px; /* 缩小高度 */
    line-height: 1.5;
    padding: 0.2rem 0.4rem; /* 减少内边距 */
    font-size: 0.8rem; /* 缩小字体 */
}

/* 大尺寸表单控件 */
.form-control-lg,
.form-select-lg {
    height: 44px; /* 缩小高度 */
    line-height: 1.5;
    padding: 0.4rem 0.8rem; /* 减少内边距 */
    font-size: 1.1rem; /* 缩小字体 */
}

/* 修复选择框的箭头图标对齐 */
.form-select {
    background-position: right 0.6rem center; /* 调整位置 */
    background-size: 14px 10px; /* 缩小图标 */
}

/* 修复输入框组的高度一致性 */
.input-group .form-control,
.input-group .form-select {
    height: 100%; /* 继承输入框组的高度 */
}

.input-group-sm .form-control,
.input-group-sm .form-select {
    height: 100%; /* 继承输入框组小尺寸的高度 */
}

.input-group-lg .form-control,
.input-group-lg .form-select {
    height: 100%; /* 继承输入框组大尺寸的高度 */
}

/* 特定针对筛选栏的表单控件 */
.filter-bar .form-control,
.filter-bar .form-select,
.filter-bar .btn {
    height: 30px; /* 使用小尺寸高度 */
    padding: 0.2rem 0.4rem; /* 减少内边距 */
    font-size: 0.8rem; /* 缩小字体 */
}

/* 表格内表单控件 */
.table .form-control,
.table .form-select {
    height: 30px; /* 小尺寸，更紧凑 */
    padding: 0.2rem 0.4rem; /* 减少内边距 */
}

/* 修复输入组在小屏幕上的显示 */
.input-group {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        width: 100%;
        margin-bottom: 5px;
        border-radius: 6px !important;
    }
    
    .input-group > .form-control:not(:last-child),
    .input-group > .form-select:not(:last-child) {
        border-bottom-right-radius: 6px !important;
        border-top-right-radius: 6px !important;
    }
    
    .input-group > .btn:not(:first-child) {
        border-top-left-radius: 6px !important;
        border-bottom-left-radius: 6px !important;
    }
}

/* ===== 加载动画 ===== */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px; /* 减少高度 */
}

.spinner-border {
    width: 2.5rem; /* 缩小 */
    height: 2.5rem; /* 缩小 */
}

/* ===== 模态框样式 ===== */
.modal-content {
    border-radius: 5px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #ffffff;
    color: #000000;
    border-radius: 5px;
    padding: 12px 15px; /* 减少内边距 */
    font-size: 14px; /* 缩小字体 */
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    font-size: 14px; /* 缩小图标 */
}

.modal-body {
    font-size: 13px; /* 缩小字体 */
}

.modal-lg {
    max-width: 800px;
}

.modal-body .alert-info {
    background-color: #e7f3ff;
    border-color: #b3d7ff;
    font-size: 13px; /* 缩小字体 */
}


/* ===== 修复模态框关闭按钮样式 ===== */
.modal-header .btn-close {
    filter: none !important;  /* 移除 filter: invert(1) 可能导致的图标隐藏 */
    opacity: 0.8;
    font-size: 14px;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
    width: 1em;
    height: 1em;
}

/* 深色模态框头部的关闭按钮 */
.modal-header.bg-danger .btn-close,
.modal-header.bg-warning .btn-close,
.modal-header.bg-primary .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* 确保按钮可见 */
.btn-close {
    box-sizing: content-box;
    border: 0;
    border-radius: .375rem;
    opacity: .5;
    padding: .25em .25em;
}

.btn-close:hover {
    opacity: .75;
}

.btn-close:focus {
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
    opacity: 1;
}

/* 修复按钮关闭图标的颜色 */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 确保模态框头部有正确的内边距 */
.modal-header {
    padding: 12px 15px;
    position: relative;
}


@media (max-width: 768px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-content {
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
    }
}

/* ===== 工具类 ===== */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #2c3e50 !important;
}

.text-success {
    color: #42b983 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

.rounded {
    border-radius: 6px !important;
}

/* 软件管理页面特定样式 */
.software-icon {
    width: 35px; /* 缩小 */
    height: 35px; /* 缩小 */
    border-radius: 8px;
    background-color: rgba(66, 185, 131, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #42b983;
    font-size: 16px; /* 缩小图标 */
}

.appkey-cell {
    display: flex;
    align-items: center;
}

.appkey-cell code {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px; /* 缩小字体 */
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
    font-size: 13px; /* 缩小字体 */
}

.page-link {
    color: #2c3e50;
    border-color: #dee2e6;
    padding: 6px 10px; /* 减少内边距 */
    font-size: 13px; /* 缩小字体 */
}

.page-item.active .page-link {
    background-color: #2c3e50;
    border-color: #2c3e50;
}

.page-item.disabled .page-link {
    color: #6c757d;
}

/* 表单控件样式 */
.form-select {
    cursor: pointer;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-size: 13px; /* 缩小字体 */
    padding: 6px 10px; /* 减少内边距 */
}

/* 表格操作按钮 */
.btn-group-sm .btn {
    padding: 0.2rem 0.4rem; /* 减少内边距 */
    font-size: 0.8rem; /* 缩小字体 */
}

/* 复选框样式 */
input[type="checkbox"] {
    cursor: pointer;
}

/* 代码块样式 */
code {
    font-family: 'Courier New', monospace;
    padding: 2px 6px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 12px; /* 缩小字体 */
}

/* 时间显示样式 */
.text-muted.small {
    font-size: 11px; /* 缩小字体 */
    line-height: 1.4;
}

/* 空状态样式 */
.text-center.py-4 .fa-2x {
    opacity: 0.5;
    font-size: 1.5rem; /* 缩小图标 */
}

/* 隐藏移动端的关闭菜单按钮 */
.sidebar-footer {
    display: none;
}

/* 快捷入口卡片样式 */
.quick-entry-card {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quick-entry-card:hover {
    border-color: #1890ff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.quick-entry-card .icon-container {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.quick-entry-card .entry-content h6 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.quick-entry-card .entry-content p {
    font-size: 12px;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quick-entry-card {
        padding: 15px;
    }
    
    .quick-entry-card .icon-container {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .quick-entry-card .entry-content h6 {
        font-size: 14px;
    }
}

/* 用户资料卡片样式 */
.profile-card {
    border: none;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #2c3e50 0%, #42b983 100%);
    color: white;
    position: relative;
}

.profile-avatar-container {
    position: relative;
    margin-right: 25px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    /* 使用背景图片 */
    /* background-image: url('头像图片路径'); */
    background-size: cover;
    background-position: center;
    /* 保持原来的半透明效果 */
    background-color: rgba(255, 255, 255, 0.2);
    background-blend-mode: overlay;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* 隐藏字体图标 */
    /* 使用box-shadow创建边框效果 */
    border: none;
    box-shadow: 
        0 0 0 5px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 0, 0, 0.2);
}

.avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    padding: 4px 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.avatar-badge .badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.profile-uid {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(5px);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* 配额进度条区域 */
.profile-quota-section {
    padding: 25px 30px;
    background: white;
}

.quota-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quota-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.quota-numbers {
    font-size: 18px;
    font-weight: 700;
}

.used-quota {
    color: #42b983;
}

.total-quota {
    color: #6c757d;
}

.quota-separator {
    margin: 0 8px;
    color: #adb5bd;
}

.quota-progress-container {
    margin: 20px 0;
}

.quota-progress {
    border-radius: 10px;
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quota-progress .progress-bar {
    border-radius: 10px;
    transition: width 1s ease-in-out;
    background: linear-gradient(90deg, #42b983 0%, #2c3e50 100%);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

.quota-tips {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #42b983;
}

.quota-tips i {
    color: #42b983;
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .profile-avatar-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    /* 在移动端隐藏统计项 
    .profile-stats {
        display: none !important; 
    }
	*/
    
    /* 移动端下调整用户昵称和UID的间距 */
    .profile-uid {
        margin-bottom: 0;
    }
    
    /* 移动端下进度条区域也需要调整 */
    .profile-quota-section {
        padding: 20px;
    }
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    width: 100%;
    height: 250px; /* 固定高度确保Chart.js能正确渲染 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .chart-container {
        height: 150px;
    }
}

/* ===== 中等屏幕（平板）响应式设计 ===== */

/* 平板设备 (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
    /* 调整侧边栏和主内容区域 */
    .left-sidebar {
        width: 220px; /* 缩小侧边栏 */
    }
    
    .main-content-area {
        margin-left: 220px; /* 调整主内容区域偏移 */
    }
    
    .left-sidebar.collapsed ~ .main-content-area {
        margin-left: 80px !important;
    }
    
    /* 调整导航栏品牌区域 */
    .sidebar-brand {
        padding: 20px 15px;
    }
    
    .brand-text .brand-name {
        font-size: 18px;
    }
    
    /* 调整导航菜单 */
    .sidebar-menu {
        padding: 15px 0;
    }
    
    .nav-link {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .nav-link i {
        font-size: 14px;
        left: 15px;
    }
    
    .nav-link span {
        margin-left: 24px;
    }
    
    /* 调整顶部导航栏 */
    .top-navbar .container-fluid {
        padding: 0 15px;
    }
    
    .navbar-left .text-muted {
        font-size: 12px;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 调整页面内容区域 */
    .page-header {
        padding: 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    /* 调整表格响应式 */
    .table-responsive {
        overflow-x: auto;
    }
    
    .table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    /* 调整卡片布局 */
    .card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 12px;
        font-size: 13px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* 调整按钮组 */
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
    
    /* 调整筛选栏 */
    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .btn {
        font-size: 12px;
    }
    
    /* 调整分页 */
    .pagination {
        font-size: 12px;
    }
    
    .page-link {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* 调整模态框 */
    .modal-dialog {
        max-width: 90%;
        margin: 10px auto;
    }
    
    .modal-content {
        font-size: 13px;
    }
    
    /* 调整表单控件 */
    .form-control,
    .form-select {
        font-size: 13px;
    }
    
    /* 调整页脚 */
    .page-footer {
        padding: 10px 15px;
        font-size: 11px;
    }
    
    /* 调整面包屑导航 */
    .breadcrumb-nav {
        font-size: 13px;
    }
    
    /* 调整图表容器 */
    .chart-container {
        height: 220px;
    }
    
    /* 调整快速入口卡片 */
    .quick-entry-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .quick-entry-card .icon-container {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .quick-entry-card .entry-content h6 {
        font-size: 14px;
    }
    
    /* 隐藏部分非必要文本 */
    .d-none.d-md-block .text-muted {
        display: none !important;
    }
    
    /* 修复侧边栏收缩状态在平板下的问题 */
    .left-sidebar.collapsed {
        width: 80px !important;
    }
    
    .left-sidebar.collapsed .nav-link span {
        opacity: 0;
    }
    
    .left-sidebar.collapsed .brand-text {
        opacity: 0;
    }
}

/* 小屏幕平板 (576px - 768px) */
@media (min-width: 576px) and (max-width: 768px) {
    .left-sidebar {
        width: 200px;
    }
    
    .main-content-area {
        margin-left: 200px;
    }
    
    .left-sidebar.collapsed ~ .main-content-area {
        margin-left: 80px !important;
    }
    
    /* 完全隐藏桌面端提示文本 */
    .d-none.d-md-block {
        display: none !important;
    }
    
    /* 进一步调整表格 */
    .table {
        min-width: 500px;
    }
    
    /* 调整页面操作按钮 */
    .page-actions .btn {
        margin-bottom: 5px;
    }
    
    /* 调整用户头像和信息 */
    .user-avatar {
        width: 30px;
        height: 30px;
    }
    
    .user-details {
        display: none;
    }
}

/* 大型平板 (992px - 1200px) */
@media (min-width: 992px) and (max-width: 1200px) {
    .left-sidebar {
        width: 240px;
    }
    
    .main-content-area {
        margin-left: 240px;
    }
    
    /* 调整表格容器 */
    .table-responsive {
        overflow-x: auto;
    }
    
    /* 确保表格不会溢出 */
    .table {
        min-width: 700px;
    }
    
    /* 调整页面标题 */
    .page-title {
        font-size: 22px;
    }
}

/* ===== 通用响应式调整 ===== */

/* 确保图片响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 响应式文本截断 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式flex布局 */
@media (max-width: 768px) {
    .d-flex {
        flex-wrap: wrap;
    }
}

/* 响应式网格系统增强 */
@media (max-width: 768px) {
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* 响应式工具类 */
.d-tablet-none {
    display: none;
}

@media (min-width: 768px) and (max-width: 992px) {
    .d-tablet-block {
        display: block !important;
    }
    
    .d-tablet-inline {
        display: inline !important;
    }
    
    .d-tablet-inline-block {
        display: inline-block !important;
    }
    
    .d-tablet-flex {
        display: flex !important;
    }
    
    .d-tablet-none {
        display: none !important;
    }
}

/* 响应式间距调整 */
@media (max-width: 768px) {
    .p-3 {
        padding: 1rem !important;
    }
    
    .p-4 {
        padding: 1.5rem !important;
    }
    
    .m-3 {
        margin: 1rem !important;
    }
    
    .m-4 {
        margin: 1.5rem !important;
    }
}

/* 连续响应式断点 */

/* 超大桌面屏幕 (1400px以上) - 保持原样 */

/* 大桌面屏幕 (1200px - 1400px) */
@media (max-width: 1400px) {
    .left-sidebar {
        width: 240px;
    }
    
    .main-content-area {
        margin-left: 240px;
    }
    
    /* 确保表格不会溢出 */
    .table-responsive {
        overflow-x: auto;
    }
}

/* 中等桌面屏幕 (992px - 1200px) */
@media (max-width: 1200px) {
    .left-sidebar {
        width: 220px;
    }
    
    .main-content-area {
        margin-left: 220px;
    }
    
    /* 调整顶部导航栏文字 */
    .navbar-left .text-muted {
        max-width: 150px;
        font-size: 13px;
    }
    
    /* 压缩页面操作按钮 */
    .page-actions .btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* 调整表格容器 */
    .table-responsive {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 小桌面/大平板 (900px - 992px) */
@media (max-width: 992px) {
    .left-sidebar {
        width: 200px;
    }
    
    .main-content-area {
        margin-left: 200px;
    }
    
    /* 隐藏非必要的顶部文本 */
    .navbar-left .text-muted {
        display: none;
    }
    
    /* 压缩页面标题和操作区域 */
    .page-header {
        padding: 12px 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    /* 强制表格响应式 */
    .table {
        min-width: 800px; /* 确保表格有最小宽度，避免内容挤在一起 */
    }
    
    /* 压缩卡片内边距 */
    .card-body {
        padding: 12px;
    }
    
    /* 调整按钮大小 */
    .btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 中等平板 (800px - 900px) */
@media (max-width: 900px) {
    .left-sidebar {
        width: 180px;
    }
    
    .main-content-area {
        margin-left: 180px;
    }
    
    /* 调整导航菜单字体大小 */
    .nav-link {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .nav-link i {
        font-size: 14px;
        left: 12px;
    }
    
    .nav-link span {
        margin-left: 22px;
    }
    
    /* 压缩页面内容区域 */
    .page-content {
        padding: 12px;
    }
    
    /* 表格需要更大的最小宽度 */
    .table {
        min-width: 850px;
    }
    
    /* 调整模态框大小 */
    .modal-dialog {
        max-width: 95%;
        margin: 5px auto;
    }
}

/* 小平板 (768px - 800px) */
@media (max-width: 800px) {
    .left-sidebar {
        width: 70px; /* 接近移动端，只显示图标 */
    }
    
    .main-content-area {
        margin-left: 70px;
    }
    
    /* 完全隐藏侧边栏文字 */
    .left-sidebar .brand-text,
    .left-sidebar .nav-link span {
        display: none;
    }
    
    /* 调整侧边栏图标居中 */
    .left-sidebar .nav-link {
        justify-content: center;
        padding: 10px;
    }
    
    .left-sidebar .nav-link i {
        position: static;
        margin: 0;
        font-size: 16px;
    }
    
    .left-sidebar .sidebar-brand {
        justify-content: center;
        padding: 20px 10px;
    }
    
    .left-sidebar .sidebar-brand i {
        position: static;
        margin: 0;
    }
    
    /* 隐藏用户详细信息 */
    .user-details {
        display: none !important;
    }
    
    /* 进一步压缩页面元素 */
    .page-title {
        font-size: 16px;
    }
    
    .breadcrumb-nav {
        font-size: 12px;
    }
    
    /* 表格需要更大的最小宽度 */
    .table {
        min-width: 900px;
    }
}

/* 移动端 (小于768px) - 保持现有样式 */
@media (max-width: 768px) {
    /* 现有移动端样式不变 */
}

/* 响应式工具类增强 */

/* 强制换行 */
.break-word {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 文本截断 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 隐藏滚动条但保留功能 */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* ===== 仪表盘筛选卡片样式 ===== */
.dashboard-filter-card {
    background-color: white;
    border-radius: 5px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    min-height: 85px; /* 与统计卡片高度对齐 */
    display: flex;
    align-items: center;
}

.dashboard-filter-card .filter-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.dashboard-filter-card .filter-group {
    display: flex;
    align-items: center;
    min-width: 240px;
}

.dashboard-filter-card .filter-label {
    margin-right: 10px;
    font-size: 14px;
    color: #495057;
    white-space: nowrap;
    font-weight: 500;
}

.dashboard-filter-card .filter-control {
    flex: 1;
}

/* 优化选择框样式 */
.dashboard-filter-card .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 14px;
    height: 40px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-filter-card .form-select:focus {
    border-color: #42b983;
    box-shadow: 0 0 0 0.2rem rgba(66, 185, 131, 0.25);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .dashboard-filter-card .filter-group {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-filter-card {
        padding: 15px;
        min-height: auto;
    }
    
    .dashboard-filter-card .filter-body {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .dashboard-filter-card .filter-group {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 576px) {
    .dashboard-filter-card .filter-label {
        font-size: 13px;
        min-width: 70px;
    }
    
    .dashboard-filter-card .form-select {
        font-size: 13px;
        padding: 7px 10px;
        height: 38px;
    }
}

/* ===== 仪表盘统计卡片样式（优化版） ===== */
.dashboard-stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    flex: 1;
    min-width: 220px;
    background-color: white;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-height: 110px; /* 确保卡片有足够高度与顶部对齐 */
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dashboard-stat-card .stat-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.dashboard-stat-card .stat-content {
    flex: 1;
}

.dashboard-stat-card .stat-value {
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 14px;
    color: #2c3e50;
}

.dashboard-stat-card .stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
    font-weight: 500;
}

.dashboard-stat-card .stat-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #adb5bd;
}

.dashboard-stat-card .stat-meta i {
    font-size: 11px;
    margin-right: 4px;
}

/* 不同统计卡片的不同颜色主题 */
.dashboard-stat-card.total-keys .stat-icon-container {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.dashboard-stat-card.total-keys .stat-icon-container i {
    color: #3498db;
}

.dashboard-stat-card.used-keys .stat-icon-container {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.dashboard-stat-card.used-keys .stat-icon-container i {
    color: #2ecc71;
}

.dashboard-stat-card.expired-keys .stat-icon-container {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.dashboard-stat-card.expired-keys .stat-icon-container i {
    color: #f39c12;
}

.dashboard-stat-card.online-users .stat-icon-container {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.dashboard-stat-card.online-users .stat-icon-container i {
    color: #9b59b6;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .dashboard-stat-card {
        min-width: 200px;
    }
}

@media (max-width: 992px) {
    .dashboard-stat-card {
        min-width: calc(50% - 10px);
    }
    
    .dashboard-stat-card .stat-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .dashboard-stat-card .stat-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .dashboard-stats-container {
        gap: 15px;
    }
    
    .dashboard-stat-card {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .dashboard-stat-card {
        padding: 15px;
    }
    
    .dashboard-stat-card .stat-icon-container {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .dashboard-stat-card .stat-value {
        font-size: 22px;
    }
    
    .dashboard-stat-card .stat-label {
        font-size: 13px;
    }
}

/* 优化图表显示 - 白色背景 */
.dashboard-chart-card .chart-container {
    height: 280px;
    min-height: 280px;
    position: relative;
    margin-bottom: 10px;
    background-color: white; /* 确保容器背景为白色 */
    border-radius: 4px; /* 可选：添加圆角 */
}

/* 图表样式优化 */
.dashboard-chart-card canvas {
    width: 100% !important;
    height: 100% !important;
    background-color: white; /* 确保canvas背景为白色 */
}

/* 优化图表卡片样式 */
.dashboard-chart-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white; /* 卡片背景为白色 */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-chart-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 16px;
}

.dashboard-chart-card .card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.dashboard-chart-card .card-body {
    padding: 16px;
    background-color: white; /* 确保卡片内容区背景为白色 */
}

/* 确保图表区域完全白色 */
.chartjs-render-monitor {
    background-color: white !important;
}

/* 去掉图表内默认的边框和阴影 */
.chartjs-render-monitor {
    border: none !important;
    box-shadow: none !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 图表容器在移动端调整高度 */
    .dashboard-chart-card .chart-container {
        height: 240px;
        min-height: 240px;
    }
    
    /* 图表卡片在移动端调整内边距 */
    .dashboard-chart-card .card-header {
        padding: 10px 12px;
    }
    
    .dashboard-chart-card .card-header h6 {
        font-size: 14px;
    }
    
    .dashboard-chart-card .card-body {
        padding: 12px;
    }
    
    /* 筛选卡片在移动端调整 */
    .dashboard-filter-card {
        padding: 12px;
    }
    
    .filter-group {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .filter-label {
        margin-bottom: 6px;
        font-size: 13px;
    }
    
    .filter-control {
        width: 100%;
    }
    
    /* 概览卡片在移动端调整 */
    .dashboard-stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .dashboard-stat-card {
        padding: 12px;
    }
    
    .stat-icon-container i {
        font-size: 1.5rem !important;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-meta {
        font-size: 10px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .dashboard-chart-card .chart-container {
        height: 200px;
        min-height: 200px;
    }
    
    .dashboard-stats-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* 进一步减少标签显示 */
    .chartjs-tick-text {
        font-size: 7px !important;
    }
}


/* ===== 修复输入框组在移动端的显示问题 ===== */

/* 移除原有导致换行的规则 */
@media (max-width: 768px) {
    .input-group {
        flex-wrap: nowrap !important; /* 强制不换行 */
    }
    
    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        width: auto !important; /* 改为自动宽度 */
        margin-bottom: 0 !important; /* 移除底部边距 */
        border-radius: 0 !important; /* 重置圆角 */
    }
    
    /* 恢复第一个元素的圆角 */
    .input-group > .form-control:first-child,
    .input-group > .form-select:first-child,
    .input-group > .btn:first-child {
        border-top-left-radius: 6px !important;
        border-bottom-left-radius: 6px !important;
    }
    
    /* 恢复最后一个元素的圆角 */
    .input-group > .form-control:last-child,
    .input-group > .form-select:last-child,
    .input-group > .btn:last-child {
        border-top-right-radius: 6px !important;
        border-bottom-right-radius: 6px !important;
    }
    
    /* 确保输入框能正常缩小 */
    .input-group > .form-control {
        flex: 1 1 auto; /* 允许缩小和拉伸 */
        min-width: 50px; /* 最小宽度，防止太小 */
    }
    
    /* 输入框组的文本元素 */
    .input-group-text {
        flex-shrink: 0; /* 禁止缩小 */
        min-width: 45px; /* 固定最小宽度 */
    }
    
    /* 密码显示/隐藏按钮 */
    .input-group .btn-outline-secondary {
        flex-shrink: 0; /* 禁止缩小 */
        min-width: 45px; /* 固定最小宽度 */
    }
}

/* 针对登录页面的特定修复 */
@media (max-width: 768px) {
    .login-container {
        width: 100%;
        margin: 10px;
    }
    
    .login-card {
        margin: 0 10px;
    }
    
    /* 确保输入框组在移动端也能完整显示 */
    .login-body .input-group {
        min-width: 280px; /* 确保最小宽度 */
        width: 100%;
        overflow-x: auto; /* 允许水平滚动 */
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
        border: 1px solid #dee2e6;
    }
    
    /* 隐藏滚动条但保留功能 */
    .login-body .input-group::-webkit-scrollbar {
        display: none;
    }
    
    .login-body .input-group {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* 确保输入框能正常使用 */
    .login-body .input-group .form-control {
        width: 100%;
        min-width: 150px;
        border: none;
        outline: none;
    }
    
    .login-body .input-group .input-group-text {
        border: none;
        background-color: #f8f9fa;
        border-right: 1px solid #dee2e6;
    }
    
    /* 注册模态框中的输入框组 */
    .register-modal .input-group {
        min-width: 280px;
        width: 100%;
    }
}

/* 针对非常小的屏幕进一步优化 */
@media (max-width: 480px) {
    .login-body .input-group {
        min-width: 250px;
    }
    
    /* 简化输入框组，移除部分装饰 */
    .input-group-text {
        padding: 0.375rem 0.5rem;
    }
    
    .input-group-text i {
        font-size: 0.875rem;
    }
    
    /* 减少边距和内边距 */
    .login-body {
        padding: 20px;
    }
    
    .login-header {
        padding: 20px;
    }
}
