/* FQA国际货运代理管理系统 - 主样式文件 */

/* CSS变量定义 */
:root {
    /* 主色调 - 蓝色 */
    --primary-color: #006dea;
    --primary-hover: #0056b3;
    --primary-active: #004494;

    /* 成功色 - 绿色 */
    --success-color: #00b907;
    --success-hover: #009906;

    /* 警告色 */
    --warning-color: #faad14;
    --warning-hover: #ffc53d;

    /* 错误色 - 红色 */
    --error-color: #fd5901;
    --error-hover: #e04d01;

    /* 信息色 - 使用主色蓝色 */
    --info-color: #006dea;
    
    /* 文字颜色 */
    --text-primary: #262626;
    --text-secondary: #000000;
    --text-disabled: #bfbfbf;
    --text-on-primary: #ffffff;
    
    /* 边框颜色 */
    --border-color: #d9d9d9;
    --border-light: #e8e8e8;
    
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-dark: #f0f2f5;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    
    /* 过渡 */
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    
    /* 侧边栏宽度 */
    --sidebar-width: 180px;
    --sidebar-collapsed-width: 60px;
    
    /* 头部高度 */
    --header-height: 40px;
    
    /* 标签页高度 */
    --tabs-height: 30px;
}

/* 暗黑模式 */
[data-theme="dark"] {
    --text-primary: #e8e8e8;
    --text-secondary: #a6a6a6;
    --text-disabled: #5c5c5c;
    --text-on-primary: #ffffff;
    --border-color: #434343;
    --border-light: #303030;
    --bg-white: #141414;
    --bg-light: #1f1f1f;
    --bg-dark: #0d0d0d;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--text-primary);
    background-color: var(--bg-dark);
}

/* 布局容器 */
#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 主布局 */
.main-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: #1a1a1a;  /* 全黑色背景 */
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    flex-shrink: 0;
    position: relative;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* 折叠时显示菜单名称 */
.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar.collapsed .menu-item-link {
    justify-content: center;
    padding: 0 8px;
}

.sidebar.collapsed .menu-item-link .menu-icon {
    margin-right: 0;
}

/* 折叠状态下只隐藏一级菜单的标题，不隐藏子菜单的 */
.sidebar.collapsed > .sidebar-menu > .menu-item > .menu-item-link > .menu-title {
    display: none;
}

.sidebar.collapsed .menu-item.has-submenu > .menu-item-link .menu-arrow {
    display: none;
}

/* 手机端侧边栏关闭按钮 */
.sidebar-close {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    z-index: 1001;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    min-height: var(--header-height);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

/* 侧边栏头部 - 展开和折叠状态 */
/* 展开时：logo换行公司名称 */
.sidebar-header-expanded {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4px 0;
}

.sidebar-header-expanded .sidebar-logo {
    height: 30px;
    margin-right: 0;
    margin-bottom: 4px;
}

.sidebar-header-expanded .sidebar-title {
    font-size: 14px;
    text-align: center;
    color: #efefef;
    white-space: nowrap;
}

/* 折叠时：favicon换行FQA */
.sidebar-header-collapsed {
    display: none !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4px 0;
}

.sidebar-header-collapsed .sidebar-favicon {
    height: 35px;
    width: 35px;
    margin-bottom: 1px;
}

.sidebar-header-collapsed .sidebar-favicon-text {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* 折叠状态时显示头部折叠内容 */
.sidebar.collapsed .sidebar-header-expanded {
    display: none !important;
}

.sidebar.collapsed .sidebar-header-collapsed {
    display: flex !important;
}

/* 侧边栏底部 - 展开和折叠状态 */
.sidebar-footer-expanded {
    display: block;
    width: 100%;
}

.sidebar-footer-collapsed {
    display: none;
    width: 100%;
}

/* 折叠状态时显示底部折叠内容 */
.sidebar.collapsed .sidebar-footer-expanded {
    display: none;
}

.sidebar.collapsed .sidebar-footer-collapsed {
    display: block;
}

.sidebar.collapsed .sidebar-footer {
    font-size: 10px;
    padding: 8px 4px;
}

/* 侧边栏底部链接样式 */
.sidebar-footer-link {
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.sidebar-footer-link:hover {
    color: var(--primary-color);
}

.sidebar-footer-link-collapsed {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 10px;
    white-space: nowrap;
}

.sidebar-footer-link-collapsed:hover {
    color: var(--primary-color);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #999;
    text-align: center;
    flex-shrink: 0;
}

/* 菜单项 */
.menu-item {
    position: relative;
}

/* 侧边栏内的菜单项文字颜色 - 白色 */
.sidebar .menu-item-link {
    color: #e0e0e0;
}

.sidebar .menu-item-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 菜单项选中状态 - 使用主色蓝色 */
.sidebar .menu-item-link.active,
.sidebar .menu-item.active > .menu-item-link {
    background: var(--primary-color);
    color: #ffffff;
}

.sidebar .menu-item-link.active .menu-icon,
.sidebar .menu-item.active > .menu-item-link .menu-icon {
    color: #000;
}

.sidebar .menu-item-link.active .menu-title,
.sidebar .menu-item.active > .menu-item-link .menu-title {
    color: #ffffff;
}

/* 子菜单背景 */
.sidebar .submenu {
    background: #2a2a2a;
}

.sidebar .submenu .menu-item-link {
    color: #ffffff;
}

.sidebar .submenu .menu-item-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-item-link {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

/* 箭头图标区域 - 扩大点击区域 */
.menu-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    cursor: pointer;
    flex-shrink: 0;
    color: #999;
    /* 确保箭头区域不阻止事件冒泡，让父元素处理 */
    pointer-events: none;
}

.menu-arrow i {
    pointer-events: auto;
}

.sidebar .menu-arrow {
    color: #999;
}

.menu-item.expanded .menu-arrow {
    transform: rotate(90deg);
}

.sidebar.collapsed .menu-arrow {
    display: none;
}

/* 一级菜单项 - 整个区域都可点击展开 */
.menu-item.has-submenu > .menu-item-link {
    cursor: pointer;
}

.menu-item.has-submenu > .menu-item-link::before {
    content: '';
    position: absolute;
    right: 8px;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

/* 侧边栏收起时隐藏箭头但保留功能 */
.sidebar.collapsed .menu-item.has-submenu > .menu-item-link::before {
    display: none;
}

/* 子菜单 */
.submenu {
    display: none;
    background: var(--bg-light);
}

/* 子菜单显示规则 - 只有expanded状态才显示 */
#sidebarMenu .menu-item.expanded > .submenu {
    display: block !important;
}

/* 侧边栏收起时的子菜单样式 */
.sidebar.collapsed .submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    padding: 8px 0;
    pointer-events: auto;
    display: none;
}

/* 折叠状态下子菜单内的菜单项样式 */
.sidebar.collapsed .submenu .menu-item-link {
    padding: 0 12px;
    color: #e0e0e0;
    justify-content: flex-start !important;
    height: 40px;
}

.sidebar.collapsed .submenu .menu-item-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar.collapsed .submenu .menu-item-link .menu-title {
    display: inline-block !important;
    color: #e0e0e0;
}

.sidebar.collapsed .submenu .menu-item-link:hover .menu-title {
    color: #fff;
}

.sidebar.collapsed .submenu .menu-item-link .menu-icon {
    margin-right: 10px !important;
    color: #999;
}

/* 折叠状态下悬停显示子菜单 */
.sidebar.collapsed .menu-item.has-submenu.hover-show > .submenu {
    display: block !important;
}

/* 确保折叠状态下菜单项有定位 */
.sidebar.collapsed .menu-item {
    position: relative;
}

/* 确保悬浮时子菜单不被截断 */
.sidebar.collapsed .menu-item {
    position: relative !important;
}

/* 子菜单内边距（展开状态） */
.submenu .menu-item-link {
    padding-left: 30px;
}

/* 折叠状态下允许子菜单超出侧边栏显示 */
.sidebar.collapsed {
    overflow: visible;
}

.sidebar.collapsed .sidebar-menu {
    overflow: visible;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* 顶部栏 */
.header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    flex-shrink: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.header-toggle:hover {
    background: var(--bg-light);
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    margin-left: 16px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item::after {
    content: '>';
    margin: 0 8px;
    color: var(--text-disabled);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item:last-child {
    color: var(--text-primary);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.header-item {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.header-item:hover {
    background: var(--bg-light);
}

.header-user {
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    height: 40px;
}

.header-user:hover {
    background: var(--bg-light);
}

.header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 8px;
}

.header-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 头部时间显示 */
.header-time {
    width: auto;
    padding: 0 8px;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 头部搜索 */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-trigger {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.search-trigger:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.search-box {
    position: absolute;
    top: 50%;
    right: 35px;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid #c9c9c9;
    border-radius: 5px;
    box-shadow: 0 1px 1px rgba(24, 144, 255, 0.2);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.search-box.show {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}

.search-input {
    border: none;
    outline: none;
    padding: 10px 10px;
    font-size: 13px;
    width: 200px;
    background: transparent;
    color: var(--text-primary);
    border-radius: 24px 0 0 24px;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn:hover {
    background: var(--primary-hover);
}

.search-close {
    background: none;
    border: none;
    padding: 10px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    font-size: 13px;
}

.search-close:hover {
    color: var(--error-color);
}

/* 头部主题切换 */
.header-theme {
    cursor: pointer;
    transition: color var(--transition-fast);
}

/* 用户下拉菜单 */
.header-user {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 160px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1001;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.user-dropdown-item:hover {
    background: var(--bg-light);
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Tabs标签页 */
.tabs-container {
    height: var(--tabs-height);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.tabs-list {
    display: flex;
    height: 36px;
    overflow-x: auto;
    gap: 4px;
}

.tabs-list::-webkit-scrollbar {
    display: none;
}

.tab-item {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    cursor: pointer;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
    position: relative;
    background: var(--bg-white);
    font-size: 13px;
    position: relative;
}

.tab-item:hover {
    color: var(--text-primary);
    background: var(--bg-white);
}

/* 所有Tab都有方框边框，激活时更明显 */
.tab-item.active {
    color: var(--primary-color);
    background: var(--bg-white);
    border-bottom-color: var(--bg-white);
    font-weight: 500;
    z-index: 1;
}

/* 激活Tab底部下划线 */
.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-item .tab-title {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.tab-close:hover {
    background: var(--error-color);
    color: #fff;
    transform: rotate(90deg);
}

.tab-item.active .tab-close {
    color: var(--primary-color);
}

.tab-item.active .tab-close:hover {
    background: var(--error-color);
    color: #fff;
}

/* 页面内容区 - 移除外部滚动条，滚动交由内部 .page-body 处理 */
.page-content {
    flex: 1;
    overflow: hidden;  /* 修改：原为 overflow-y: auto，现改为 hidden，避免右侧整体滚动 */
    padding: 16px;
    background: var(--bg-dark);
}

.page-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 10px;
    height: 100%;       /* 确保占满父容器高度 */
    display: flex;
    flex-direction: column;
    overflow: hidden;   /* 防止容器本身溢出 */
}

/* 页面内容布局 - 标题固定顶部，操作按钮固定底部 */
.page-header {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.page-body {
    flex: 1;
    overflow: auto;     /* 内容区域内部滚动 */
    padding-right: 4px;  /* 预留滚动条空间，避免内容跳动 */
}

.page-footer {
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-textarea {
    height: auto;
    padding: 8px 12px;
    resize: vertical;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-default {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-default:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: var(--error-color);
    border-color: var(--error-color);
    color: #fff;
}

.btn-danger:hover {
    background: var(--error-hover);
    border-color: var(--error-hover);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 16px;
}

.pagination-info {
    margin-right: 16px;
    color: var(--text-secondary);
}

.pagination-list {
    display: flex;
    gap: 4px;
}

.pagination-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

/* 工具栏 */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-light);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 12px 16px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-toast.success {
    border-left: 4px solid var(--success-color);
}

.message-toast.error {
    border-left: 4px solid var(--error-color);
}

.message-toast.warning {
    border-left: 4px solid var(--warning-color);
}

.message-toast.info {
    border-left: 4px solid var(--info-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -200px;
        z-index: 1000;
    }

    .sidebar.show {
        left: 0;
    }

    /* 手机端显示关闭按钮 */
    .sidebar-close {
        display: flex;
    }

    /* 手机端隐藏时间 */
    .header-time {
        display: none;
    }

    .page-container {
        padding: 16px;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
}

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 16px;
}

/* 统计卡片 */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.stat-icon.primary {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.stat-icon.error {
    background: rgba(255, 77, 79, 0.1);
    color: var(--error-color);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 16px;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -200px;
        z-index: 1000;
        transition: left var(--transition-normal);
    }
    
    .sidebar.show {
        left: 0;
    }
}

/* 菜单展开状态 - 使用更具体的选择器确保显示 */
#sidebarMenu .menu-item.has-submenu.expanded > .submenu {
    display: block !important;
}

/* 子菜单内边距 */
.submenu .menu-item-link {
    padding-left: 30px;
}

.submenu .submenu .menu-item-link {
    padding-left: 30px;
}

/* 菜单图标 */
.menu-icon {
    margin-right: 12px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar .menu-icon {
    color: #999;
}

.sidebar .menu-item-link:hover .menu-icon,
.sidebar .menu-item-link.active .menu-icon,
.sidebar .menu-item.active > .menu-item-link .menu-icon {
    color: inherit;
}

.menu-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 菜单空状态 */
.menu-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard 页面样式 */
.dashboard-page .page-header {
    margin-bottom: 24px;
}

.dashboard-page .page-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dashboard-page .page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
}

.stat-card .stat-icon.bg-primary {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.stat-card .stat-icon.bg-success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.stat-card .stat-icon.bg-warning {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.stat-card .stat-icon.bg-danger {
    background: rgba(255, 77, 79, 0.1);
    color: var(--error-color);
}

.stat-card .stat-info {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.dashboard-card .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.dashboard-card .card-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.dashboard-card .card-body {
    padding: 16px 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.quick-action-item:hover {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.quick-action-item .action-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.quick-action-item span:last-child {
    font-size: 13px;
}

.todo-list .todo-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.todo-list .todo-item:last-child {
    border-bottom: none;
}

.loading-placeholder {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

/* 搜索面板样式 */
.search-panel {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-control {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    min-width: 150px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 数据表格样式 */
.data-table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 分页样式 */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 16px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.pagination li a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination li.active span {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.badge-success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(255, 77, 79, 0.1);
    color: var(--error-color);
}

.badge-warning {
    background: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background: var(--bg-light);
    color: var(--text-secondary);
}

/* 按钮链接 */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    padding: 0 4px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-link.text-danger {
    color: var(--error-color);
}

/* 文本工具类 */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.text-danger {
    color: var(--error-color);
}

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* 模态框样式优化 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-content {
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--bg-light);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 按钮样式补充 */
.btn-secondary {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-sm {
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
}

/* Row和Col样式 */
.row {
    display: flex;
    margin: 0 -8px;
}

.col-md-6 {
    width: 50%;
    padding: 0 8px;
}

@media (max-width: 768px) {
    .col-md-6 {
        width: 100%;
    }
}

/* 单选框和复选框 */
.radio-group {
    display: flex;
    gap: 16px;
}

.radio,
.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* 设置页面样式 */
.settings-wrapper {
    display: flex;
    gap: 24px;
}

.settings-tabs {
    width: 200px;
    flex-shrink: 0;
}

.settings-tabs .nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-tabs .nav-tabs li {
    margin-bottom: 4px;
}

.settings-tabs .nav-tabs li a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.settings-tabs .nav-tabs li a:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.settings-tabs .nav-tabs li.active a {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.setting-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.setting-card .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.setting-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.setting-card .card-body {
    padding: 20px;
}

/* 插件列表样式 */
.plugins-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plugin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.plugin-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.plugin-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.plugin-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.plugin-meta span {
    margin-right: 16px;
}

.plugin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 关于页面样式 */
.about-info {
    text-align: center;
    padding: 40px 0;
}

.about-logo {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-logo .logo-icon {
    font-size: 48px;
}

.about-logo .logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 8px;
}

.about-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.about-info .version {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.system-info {
    text-align: left;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.system-info h4 {
    margin-bottom: 16px;
}

/* 消息提示样式 */
.message-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.message-toast.success {
    background: var(--success-color);
}

.message-toast.error {
    background: var(--error-color);
}

.message-toast.warning {
    background: var(--warning-color);
}

.message-toast.info {
    background: var(--primary-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: var(--bg-light);
    color: var(--text-secondary);
}

/* 响应式侧边栏 */
@media (max-width: 768px) {
    .main-content {
        width: 100%;
    }
    
    .header-toggle {
        display: flex;
    }
}

/* 404页面 */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--border-color);
    line-height: 1;
}

.error-title {
    font-size: 24px;
    margin: 16px 0;
    color: var(--text-primary);
}

.error-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}