/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-image {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.logo:hover .logo-image {
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo-subtitle {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.logo:hover .logo-title {
    background: linear-gradient(135deg, #0056b3, #003d82);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover .logo-subtitle {
    color: #007bff;
}

/* 顶部导航栏 */
.top-nav {
    background: #ffffff;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
}

.nav-modules {
    display: flex;
    gap: 40px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #6c757d;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-item.active {
    color: #007bff;
    background-color: #e3f2fd;
    border-bottom: 3px solid #007bff;
}

.nav-item i {
    font-size: 16px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.nav-icon:hover {
    color: #007bff;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 主容器 */
.main-container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* 左侧边栏 */
.sidebar {
    width: 280px;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
    padding: 0 20px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    border-left: 3px solid transparent;
}

.nav-menu:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-menu.active {
    background-color: #e3f2fd;
    color: #007bff;
    border-left-color: #007bff;
    font-weight: 600;
}

.nav-menu i {
    font-size: 16px;
    width: 20px;
}

/* 主内容区域 */
.content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    background-color: #f5f6fa;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.breadcrumb .current {
    color: #007bff;
    font-weight: 600;
}

.close-breadcrumb {
    margin-left: 10px;
    cursor: pointer;
    color: #dc3545;
}

.close-breadcrumb:hover {
    color: #c82333;
}

/* 搜索筛选区域 */
.search-filter {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 15px;
}

.filter-input {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

/* 操作按钮区域 */
.action-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* 表格容器 */
.table-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-title {
    padding: 20px;
    background: #f8f9fa;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.data-table input[type="checkbox"] {
    cursor: pointer;
}

/* 状态标签 */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-normal {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-danger {
    background: #f8d7da;
    color: #721c24;
}

/* 操作图标 */
.action-icon {
    margin: 0 5px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
}

.action-icon:hover {
    color: #007bff;
}

.action-icon.fa-trash:hover {
    color: #dc3545;
}

/* 悬浮助手 */
.floating-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #007bff;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,123,255,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-assistant:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,123,255,0.4);
}

.floating-assistant i {
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 999;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .search-filter {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-input {
        min-width: auto;
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .action-bar {
        flex-wrap: wrap;
    }
    
    .nav-modules {
        gap: 20px;
    }
    
    .nav-item span {
        display: none;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-container {
    animation: fadeIn 0.5s ease-out;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

.loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
