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

:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-muted: #8c8c8c;
    --border-color: #e8e8e8;
    --bg-primary: #f0f2f5;
    --bg-white: #ffffff;
    --sidebar-width: 220px;
    --header-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* 顶部导航栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(90deg, #001529 0%, #002140 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.logo i {
    color: #00d4aa;
    font-size: 24px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

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

.logo-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
}

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

.nav-item i {
    font-size: 14px;
}

.nav-item.hot {
    position: relative;
}

.hot-tag {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 600;
}

.region-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.region-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.region-selector i:first-child {
    color: #00d4aa;
}

.region-selector i:last-child {
    font-size: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #fff;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    font-size: 24px;
}

.user-name {
    font-size: 13px;
}

/* 主容器 */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* 左侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 16px 0;
    overflow-y: auto;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
}

.sidebar-section {
    margin-bottom: 8px;
}

.section-title {
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-label {
    padding: 8px 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.05);
}

.menu-item.active {
    color: var(--primary-color);
    background: rgba(24, 144, 255, 0.1);
    border-left-color: var(--primary-color);
}

.menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: 320px;
    padding: 24px;
    background: var(--bg-primary);
}

/* 公告栏 */
.announcement {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    color: #d48806;
}

.announcement i:first-child {
    color: #faad14;
}

.close-btn {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
}

/* 引导弹窗 */
.guide-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
}

.guide-content {
    padding: 24px;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.guide-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.guide-header .close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
}

.guide-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.guide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guide-step {
    color: var(--text-muted);
    font-size: 13px;
}

.btn-next {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-header {
    margin-bottom: 16px;
}

.card-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #00b578;
}

.simple-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.simple-stat .stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.simple-stat .stat-value {
    font-size: 32px;
    color: #00b578;
}

.storage-info {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.storage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.storage-icon {
    width: 36px;
    height: 36px;
    background: rgba(24, 144, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.storage-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.storage-name {
    font-weight: 500;
    color: var(--text-primary);
}

.storage-percent {
    color: var(--primary-color);
    font-weight: 600;
}

.storage-usage {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-left: 48px;
}

.usage-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.used {
    background: var(--success-color);
}

.dot.available {
    background: #d9d9d9;
}

/* 文件存储卡片 */
.file-storage-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.circular-chart {
    position: relative;
    width: 100px;
    height: 100px;
}

.circular-chart svg {
    transform: rotate(-90deg);
}

.percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 600;
    color: #00b578;
}

.storage-summary {
    flex: 1;
}

.total-capacity {
    margin-bottom: 16px;
}

.total-capacity .label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

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

.capacity-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-row strong {
    margin-left: auto;
    color: var(--text-primary);
}

/* 消息通知区域 */
.notifications-section {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notifications-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab {
    padding: 8px 0;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: color 0.3s;
}

.tab:hover {
    color: var(--primary-color);
}

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

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
}

/* 右侧边栏 */
.right-sidebar {
    width: 320px;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
}

.user-card {
    background: linear-gradient(135deg, #f6ffed 0%, #e6f7ff 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.user-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.user-avatar-large {
    font-size: 48px;
    color: var(--text-muted);
}

.user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

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

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

.balance-section {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.balance-header {
    margin-bottom: 8px;
}

.balance-header .label {
    font-size: 13px;
    color: var(--text-muted);
}

.balance-amount {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 12px;
}

.currency {
    font-size: 18px;
    color: var(--text-primary);
}

.amount {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-recharge {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

.coupon-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-white);
    border-radius: 8px;
}

.coupon-section .label {
    font-size: 13px;
    color: var(--text-secondary);
}

.coupon-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
}

/* 资源卡片 */
.resource-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.resource-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.resource-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.resource-item i {
    font-size: 20px;
    color: var(--primary-color);
    width: 24px;
}

.resource-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-info .label {
    font-size: 13px;
    color: var(--text-secondary);
}

.resource-info .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.resource-status {
    display: flex;
    gap: 24px;
    padding-left: 36px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-item .dot.running {
    background: var(--success-color);
}

.status-item .dot.idle {
    background: #d9d9d9;
}

.status-item strong {
    color: var(--text-primary);
    margin-left: 4px;
}

/* 悬浮工具栏 */
.floating-toolbar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-white);
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 999;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tool-item:hover {
    background: rgba(24, 144, 255, 0.05);
    color: var(--primary-color);
}

.tool-item i {
    font-size: 20px;
}

.tool-item span {
    font-size: 12px;
}

/* 通用表格样式 - 与任务队列保持一致 */
.section-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.section-card .card-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    color: var(--primary-hover);
}

.data-table {
    width: 100%;
}

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

.data-table th {
    text-align: left;
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tr:hover {
    background: rgba(24, 144, 255, 0.02);
}

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

/* 表格中的名称展示 */
.table-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-icon {
    width: 40px;
    height: 40px;
    background: rgba(24, 144, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
}

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

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

.table-icon.purple {
    background: rgba(114, 46, 209, 0.1);
    color: #722ed1;
}

.table-icon.green {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.table-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.table-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

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

/* 角色标签 */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

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

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

.role-badge.member {
    background: rgba(140, 140, 140, 0.1);
    color: var(--text-secondary);
}

/* 操作按钮 */
.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

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

/* 进度条 */
.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-cell {
    min-width: 120px;
}

/* 在线状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.online {
    background: var(--success-color);
}

.status-indicator.offline {
    background: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .right-sidebar {
        display: none;
    }

    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .main-nav {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
}

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

/* 页面页脚 */
.page-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 12px;
}
