/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f1f5f9;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* ==================== 登录页面 ==================== */
#login-page {
    min-height: 100vh;
    display: flex;
    background: #f5f5f5;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* 左侧品牌区域 */
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.brand-content {
    text-align: center;
    color: white;
}

.brand-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo i {
    font-size: 80px;
    color: white;
}

.brand-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.brand-content p {
    font-size: 18px;
    opacity: 0.9;
    margin: 8px 0;
}

/* 右侧表单区域 */
.login-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

/* 登录/注册切换标签 */
.auth-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}

.auth-tab {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s;
}

.auth-tab:hover {
    color: #6b7280;
}

.auth-tab.active {
    color: #7c3aed;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 2px;
    background: #7c3aed;
}

/* 表单样式 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.auth-form .form-group label i {
    margin-right: 6px;
    color: #7c3aed;
}

.auth-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fafb;
    color: #1f2937;
    transition: all 0.2s;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #7c3aed;
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.auth-form .form-group input::placeholder {
    color: #9ca3af;
}

.auth-form .form-group small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #f59e0b;
}

.auth-form .form-group small i {
    color: #f59e0b;
}

.btn-auth {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

/* 响应式 */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .login-brand {
        padding: 40px 20px;
        min-height: 200px;
    }
    
    .brand-logo {
        width: 80px;
        height: 80px;
    }
    
    .brand-logo i {
        font-size: 50px;
    }
    
    .brand-content h1 {
        font-size: 32px;
    }
    
    .brand-content p {
        font-size: 14px;
    }
    
    .login-form-area {
        padding: 24px;
    }
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 12px;
}

.form-section h4 i {
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    padding: 12px 20px;
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* 小型输入框样式（用于表格内编辑） */
.input-sm {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-light);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-sm:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* 上传按钮样式 */
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* 导入选项区域 */
.import-options {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* 转存列表容器 */
.transfer-list-container {
    background: var(--card-bg);
}

.transfer-list-container .data-table th,
.transfer-list-container .data-table td {
    padding: 8px 10px;
    font-size: 13px;
}

.transfer-list-container .data-table input[type="text"] {
    width: 100%;
    min-width: 60px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-color);
}


/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e3a8a 0%, #4338ca 100%);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    font-size: 28px;
    color: white;
}

.sidebar-logo .logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-logo .logo-text span {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.sidebar-logo .logo-text small {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

.sidebar-logo span {
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .sidebar-logo .logo-text {
    display: none;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.sidebar-footer .user-info i {
    font-size: 20px;
}

.sidebar.collapsed .sidebar-footer .user-info span {
    display: none;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ==================== 主内容区 ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    transition: margin-left 0.3s;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 页面头部 ==================== */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.page-header h2 i {
    color: #6366f1;
}

.page-header p {
    color: #64748b;
    font-size: 14px;
}

.page-header.gradient-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    margin: -24px -24px 24px -24px;
    padding: 30px 24px;
    border-radius: 0 0 24px 24px;
}

.page-header.gradient-header h2,
.page-header.gradient-header p {
    color: white;
}

.page-header.gradient-header h2 i {
    color: white;
}

/* ==================== 工具栏 ==================== */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar select {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    min-width: 140px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: #10b981;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ==================== 数据大屏 ==================== */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.time-display {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* 任务状态卡片 */
.task-status-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border: none;
}

.task-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.status-item {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
}

.status-item i {
    font-size: 32px;
    margin-bottom: 8px;
}

.status-item.running i { color: #22c55e; }
.status-item.completed i { color: #3b82f6; }
.status-item.failed i { color: #ef4444; }
.status-item.paused i { color: #f59e0b; }

.status-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.status-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.stat-icon.green { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #9333ea; }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: #ea580c; }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #0891b2; }

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.stat-info .stat-label {
    font-size: 13px;
    color: #6b7280;
}

/* 活动列表 */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-left: 3px solid #e2e8f0;
}

.activity-item.success {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.activity-item.running {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.activity-item.fail {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-message {
    font-size: 13px;
    color: #1e293b;
    word-break: break-all;
}

.activity-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.activity-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}


/* ==================== 表格样式 ==================== */
.table-container {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
}

.data-table td {
    font-size: 14px;
    color: #1e293b;
}

.data-table tr:hover {
    background: #f8fafc;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.status-badge.running { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-badge.completed { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.status-badge.paused { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.status-badge.stopped { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.status-badge.error, .status-badge.fail { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-badge.success, .status-badge.valid { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-badge.expired, .status-badge.invalid { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btns button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btns .btn-start { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.action-btns .btn-stop { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.action-btns .btn-view { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.action-btns .btn-delete { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.action-btns .btn-edit { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.action-btns .btn-sync { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.action-btns .btn-notify { background: rgba(251, 191, 36, 0.2); color: #f59e0b; }

/* ==================== 账号管理 ==================== */
.accounts-count {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.account-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.account-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 14px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 6px;
}

.account-storage {
    padding: 0 20px 20px;
}

.storage-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.storage-info span {
    color: var(--text-color);
    font-weight: 500;
}

.storage-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 0.3s;
}

.storage-percent {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
}

.account-actions {
    display: flex;
    border-top: 1px solid var(--border-color);
}

.account-actions button {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.account-actions button:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
}

.account-actions button i {
    font-size: 18px;
}

.account-actions .btn-sync-card { color: #22c55e; }
.account-actions .btn-edit-card { color: #8b5cf6; }
.account-actions .btn-delete-card { color: #ef4444; }

/* ==================== 运行中任务卡片 ==================== */
.running-task-card {
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 40px rgba(67, 97, 238, 0.3);
}

.task-card-header {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 16px;
}

.task-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-avatar i {
    font-size: 32px;
    color: white;
}

.task-info {
    flex: 1;
}

.task-info h3 {
    font-size: 20px;
    color: white;
    margin: 0;
}

.task-info p {
    color: rgba(255,255,255,0.8);
    margin: 4px 0 0 0;
    font-size: 14px;
}

.task-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.task-status-badge.running {
    background: #22c55e;
    color: white;
}

.task-status-badge.paused {
    background: #f59e0b;
    color: white;
}

.task-progress {
    padding: 0 24px 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.progress-bar {
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 6px;
    transition: width 0.3s;
}

.task-stats {
    display: flex;
    padding: 0 24px 20px;
    gap: 24px;
}

.task-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.task-stats .stat-item i {
    font-size: 20px;
}

.task-stats .stat-item.success i { color: #22c55e; }
.task-stats .stat-item.fail i { color: #ef4444; }

.task-stats .stat-item span {
    font-size: 20px;
    font-weight: 600;
}

.task-stats .stat-item label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.task-actions {
    display: flex;
    padding: 16px 24px;
    gap: 12px;
    background: rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.task-actions button {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-stop { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.btn-pause { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.btn-resume { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.btn-logs { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.btn-export { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }

.btn-stop:hover { background: rgba(239, 68, 68, 0.3); }
.btn-pause:hover { background: rgba(249, 115, 22, 0.3); }
.btn-resume:hover { background: rgba(34, 197, 94, 0.3); }
.btn-logs:hover { background: rgba(59, 130, 246, 0.3); }
.btn-export:hover { background: rgba(168, 85, 247, 0.3); }


/* ==================== 资源检测 ==================== */
.check-results {
    max-height: 400px;
    overflow-y: auto;
}

.check-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.02);
}

.check-item.valid { border-left: 3px solid #22c55e; }
.check-item.invalid, .check-item.expired { border-left: 3px solid #ef4444; }
.check-item.error { border-left: 3px solid #f59e0b; }

.check-item .check-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.check-item.valid .check-icon { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.check-item.invalid .check-icon,
.check-item.expired .check-icon { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.check-item.error .check-icon { background: rgba(249, 115, 22, 0.2); color: #f59e0b; }

.check-item .check-content {
    flex: 1;
    min-width: 0;
}

.check-item .check-link {
    font-size: 14px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.check-item .check-message {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ==================== 推送通知设置 ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.settings-card {
    padding: 0;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
    background: rgba(99, 102, 241, 0.1);
}

.settings-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.settings-icon.pushplus {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.settings-icon.webhook {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.settings-title {
    flex: 1;
}

.settings-title h3 {
    font-size: 16px;
    margin: 0;
    color: var(--text-color);
}

.settings-title p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.settings-body {
    padding: 20px;
}

.push-features {
    margin-bottom: 20px;
}

.push-features p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.push-features p i {
    color: #22c55e;
}

.push-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 12px;
    color: #22c55e;
    font-size: 14px;
    margin-top: 20px;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ==================== 后台设置 ==================== */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.settings-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.settings-tab:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
}

.settings-tab.active {
    background: var(--primary-color);
    color: white;
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

.user-stats {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-stat .stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.user-stat .stat-num.green {
    color: #22c55e;
}

.user-stat .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== 弹窗样式 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: modalIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 700px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-content form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

/* 路径输入组 */
.path-input-group {
    display: flex;
    gap: 8px;
}

.path-input-group input {
    flex: 1;
}

.btn-browse {
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-browse:hover {
    background: var(--primary-dark);
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.checkbox-item span {
    font-size: 14px;
    color: var(--text-color);
}

.checkbox-item small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 目录浏览 */
.browse-path {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.browse-path i {
    color: var(--primary-color);
}

.folder-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.folder-item:hover {
    background: rgba(255,255,255,0.05);
}

.folder-item i {
    font-size: 20px;
    color: #fbbf24;
    margin-right: 12px;
}

.folder-item.back i {
    color: var(--text-secondary);
}

.folder-item span {
    flex: 1;
    font-size: 14px;
}

/* 日志容器 */
.logs-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
}

.log-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.log-item.success {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid #22c55e;
}

.log-item.fail {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
}

.log-item .log-icon {
    margin-right: 10px;
    font-size: 16px;
}

.log-item.success .log-icon { color: #22c55e; }
.log-item.fail .log-icon { color: #ef4444; }

.log-item .log-content {
    flex: 1;
}

.log-item .log-name {
    font-weight: 500;
    color: var(--text-color);
}

.log-item .log-link {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.log-item .log-link a {
    color: var(--primary-color);
}

.log-item .log-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== Toast提示 ==================== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .sidebar .sidebar-logo span,
    .sidebar .nav-item span,
    .sidebar .sidebar-footer .user-info span {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.open .sidebar-logo span,
    .sidebar.open .nav-item span,
    .sidebar.open .sidebar-footer .user-info span {
        display: inline;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .task-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
}
