/**
 * ParallelX Platform - 通用样式
 * 视觉对齐 parallelx.space（灰底 #f0f2f5、主色 #1877f2）
 */

:root {
    --px-blue: #1877f2;
    --px-blue-hover: #166fe5;
    --px-blue-soft: #e7f3ff;
    --px-bg: #f0f2f5;
    --px-text: #050505;
    --px-text-secondary: #65676b;
    --px-border: #ccd0d5;
    --px-white: #ffffff;
}

/* ==================== 全局样式 ==================== */
body {
    background: var(--px-bg);
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #050505;
}

/* ==================== 顶部导航栏（白底 + 蓝色 ParallelX，同 parallelx.space） ==================== */
.top-nav {
    background: var(--px-white, #ffffff);
    color: var(--px-text, #050505);
    box-shadow: none;
    border-bottom: 1px solid var(--px-border, #ccd0d5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--px-blue);
    letter-spacing: -0.02em;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: var(--px-blue) !important;
}

.module-nav {
    display: flex;
    gap: 5px;
    align-items: center;
}

.module-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--px-text-secondary, #65676b);
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.15s;
    cursor: pointer;
    position: relative;
}

.module-btn:hover {
    background: var(--px-bg);
    color: var(--px-text, #050505);
}

.module-btn.active {
    background: var(--px-blue-soft, #e7f3ff);
    color: var(--px-blue);
}

/* ==================== 下拉菜单 ==================== */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px;
    min-width: 200px;
}

.dropdown-item {
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(24, 119, 242, 0.1);
    color: #1877f2;
}

/* Bootstrap 主色对齐页眉 */
.btn-primary {
    background-color: var(--px-blue);
    border-color: var(--px-blue);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--px-blue-hover);
    border-color: var(--px-blue-hover);
}
.btn-outline-primary {
    color: var(--px-blue);
    border-color: var(--px-blue);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--px-blue);
    border-color: var(--px-blue);
}

/* ==================== 用户信息区 ==================== */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* ==================== 主内容区 ==================== */
.main-content {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: none;
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: #1877f2;
}

/* ==================== 按钮样式 ==================== */
.btn-gradient {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
    color: white;
}

.btn-outline-gradient {
    border: 2px solid #1877f2;
    color: #1877f2;
    background: white;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-outline-gradient:hover {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    border-color: transparent;
}

/* ==================== 表单控件 ==================== */
.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 0.2rem rgba(24, 119, 242, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* ==================== 表格样式 ==================== */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.1) 0%, rgba(22, 111, 229, 0.1) 100%);
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #1877f2;
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: rgba(24, 119, 242, 0.05);
}

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

.modal-header {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-footer {
    border-top: 1px solid #e9ecef;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* ==================== 徽章和标签 ==================== */
.badge-gradient {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 500;
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

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

/* ==================== 加载动画 ==================== */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 提示信息 ==================== */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
    color: #0c5460;
}

/* ==================== 语言切换器 ==================== */
.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 8px 15px;
    border: 2px solid rgba(24, 119, 242, 0.3);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1877f2;
}

.lang-btn:hover {
    border-color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: white;
    border-color: transparent;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .module-nav {
        flex-wrap: wrap;
    }
    
    .module-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .user-info {
        gap: 10px;
    }
    
    .page-container,
    .main-content {
        padding: 0 10px;
    }
}

/* ==================== 工具类 ==================== */
.text-gradient {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-card {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.shadow-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

