/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: relative;
    min-height: 100vh;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a,
.sidebar-nav li.has-submenu.active > a {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid #fff;
}

/* 子菜单样式 */
.sidebar-nav .submenu {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav .has-submenu.expanded .submenu {
    display: block;
}

.sidebar-nav li.has-submenu.active > a {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav li.has-submenu.expanded > a {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav .submenu li {
    margin: 0;
}

.sidebar-nav .submenu a {
    padding: 8px 20px 8px 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.sidebar-nav .submenu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: #007bff;
}

.sidebar-nav .submenu li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left-color: #007bff;
}

/* 箭头样式 */
.sidebar-nav .has-submenu > a {
    position: relative;
}
.sidebar-nav .has-submenu > a::after {
    content: '\f107';
    font-family: 'FontAwesome';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav .has-submenu.expanded > a::after {
    transform: translateY(-50%) rotate(180deg);
    color: #fff;
}

/* 鼠标悬停时箭头效果 */
.sidebar-nav .has-submenu > a:hover::after {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left h1 {
    font-size: 1.8rem;
    color: #333;
    font-weight: 600;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

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

.status-dot.online {
    background-color: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 用户信息区域样式 */
.user-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.user-details {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.user-details i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.user-details span {
    font-weight: 500;
    font-size: 0.9rem;
}

.logout-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.logout-btn i {
    font-size: 0.8rem;
}

/* 内容区域样式 */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 功能卡片网格样式 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.feature-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-arrow {
    color: #ccc;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-arrow {
    color: #667eea;
    transform: translateX(5px);
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* 推送统计区域 */
.push-stats-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.time-filter {
    display: flex;
    gap: 10px;
}

.time-filter .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-filter .btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.stats-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-detail-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-number.success {
    color: #28a745;
}

.stat-number.error {
    color: #dc3545;
}

.stat-number.info {
    color: #17a2b8;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* 最近任务区域 */
.recent-tasks-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 最近推送记录区域 */
.recent-logs-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.logs-list {
    margin-top: 20px;
}

.log-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.log-item:hover {
    background-color: #f8f9fa;
}

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

.log-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.log-icon.success {
    background-color: #d4edda;
    color: #155724;
}

.log-icon.error {
    background-color: #f8d7da;
    color: #721c24;
}

.log-content {
    flex: 1;
}

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

.log-task {
    font-weight: 600;
    color: #333;
}

.log-time {
    font-size: 0.8rem;
    color: #666;
}

.log-message {
    color: #555;
    margin-bottom: 3px;
}

.log-details {
    font-size: 0.8rem;
    color: #888;
}

/* 系统状态区域 */
.system-status-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.status-item {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.status-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.status-header i {
    margin-right: 10px;
    color: #667eea;
    font-size: 1.2rem;
}

.status-header span {
    font-weight: 600;
    color: #333;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-content small {
    color: #666;
    font-size: 0.8rem;
}

/* 页面标题样式 */
.subtitle {
    color: #666;
    font-size: 1rem;
    margin-top: 5px;
}

.server-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

/* 按钮样式增强 */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* 代码样式 */
code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e83e8c;
}

/* 任务区域样式 */
.tasks-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

/* 表格样式 */
.tasks-table {
    overflow-x: auto;
}

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.running {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.stopped {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.secondary {
    background-color: #e2e3e5;
    color: #6c757d;
}

/* 系统状态样式 */
.system-status {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.system-status h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
}

.status-grid {
    display: grid;
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-label {
    min-width: 100px;
    font-weight: 500;
    color: #333;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.status-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: #333;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    
    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
    }
    
    .sidebar-nav li {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .sidebar-nav a {
        padding: 10px 15px;
        border-radius: 8px;
    }
    
    .top-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tasks-table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    /* 移动端子菜单样式 */
    .sidebar-nav .submenu {
        margin-left: 10px;
        max-height: 300px; /* 移动端稍微小一点 */
    }
    
    .sidebar-nav .submenu a {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    /* 移动端子菜单箭头样式 */
    .sidebar-nav .has-submenu > a::after {
        right: 10px;
        font-size: 0.9rem;
    }
    
    /* 移动端子菜单悬停效果 */
    .sidebar-nav .has-submenu > a:hover::after {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.info {
    background-color: #17a2b8;
}

/* 返回按钮样式 */
.back-button {
    margin-bottom: 20px;
}

/* 系统设置页面样式 */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.settings-section h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.setting-item input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.setting-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-item small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

.setting-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.current-settings {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.setting-display {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.setting-display:last-child {
    margin-bottom: 0;
}

.setting-display strong {
    color: #333;
    margin-right: 10px;
}

.setting-display span {
    color: #666;
}

/* 响应式设计 - 设置页面 */
@media (max-width: 768px) {
    .settings-container {
        padding: 0 10px;
    }
    
    .settings-section {
        padding: 20px;
    }
    
    .setting-actions {
        flex-direction: column;
    }
    
    .setting-actions .btn {
        width: 100%;
    }
}



/* 日志列表白色圆角底框 */
.logs-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 32px 24px 24px 24px;
    width: 100%;
    margin: 0;
  }

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.logs-header h1 {
    font-size: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.logs-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.logs-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

/* 优化日志页面操作按钮与筛选控件的间距 */
.action-buttons {
    margin-bottom: 18px;
}

/* 优化日志筛选控件整体间距 */
.filter-controls {
    margin-bottom: 18px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* 优化每组筛选控件之间的垂直间距 */
.filter-group {
    margin-bottom: 6px;
}

/* 让筛选控件更松散 */
.filter-group label {
    margin-right: 6px;
}

/* 日志筛选横向排列美化 */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group label {
    margin-right: 4px;
    white-space: nowrap;
}
.filter-group input[type="date"] {
    height: 32px;
    padding: 4px 8px;
    font-size: 15px;
}
.filter-group button {
    height: 32px;
    padding: 0 16px;
    font-size: 15px;
    line-height: 32px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.logs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-weight: 500;
    color: #333;
}

.stat-value {
    font-weight: 600;
    font-size: 1.2rem;
}

.stat-value.error {
    color: #dc3545;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.info {
    color: #17a2b8;
}

.logs-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow-x: auto;
}

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

.logs-table th,
.logs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.logs-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.logs-table tr:hover {
    background-color: #f8f9fa;
}

.log-level {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.log-level.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.log-level.warning {
    background-color: #fff3cd;
    color: #856404;
}

.log-level.error {
    background-color: #f8d7da;
    color: #721c24;
}

.log-level.success {
    background-color: #d4edda;
    color: #155724;
}

.log-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
}

.log-message {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-actions {
    display: flex;
    gap: 5px;
}

.log-actions .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.logs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.page-info {
    font-weight: 500;
    color: #333;
}

/* 响应式设计 - 日志页面 */
@media (max-width: 768px) {
    .logs-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logs-actions {
        justify-content: center;
    }
    
    .logs-filters {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .logs-stats {
        grid-template-columns: 1fr;
    }
    
    .logs-table {
        font-size: 0.9rem;
    }
    
    .logs-table th,
    .logs-table td {
        padding: 8px 6px;
    }
    
    .log-message {
        max-width: 150px;
    }
    
    .logs-pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* 任务管理页面样式 */
.tasks-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.tasks-title-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tasks-header h1 {
    font-size: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.group-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.group-selector label {
    font-weight: 500;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.group-selector select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
    cursor: pointer;
}

.group-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.current-group-info {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-left: 10px;
}

.current-group-info.has-group {
    color: #28a745;
    font-weight: 500;
}

.tasks-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.tasks-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #ddd;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.task-card.running {
    border-left-color: #28a745;
}

.task-card.stopped {
    border-left-color: #6c757d;
}

.task-card.error {
    border-left-color: #dc3545;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.task-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.task-status.running {
    background-color: #d4edda;
    color: #155724;
}

.task-status.stopped {
    background-color: #f8d7da;
    color: #721c24;
}

.task-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.task-info {
    margin-bottom: 15px;
}

.task-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.task-info-label {
    color: #666;
    font-weight: 500;
}

.task-info-value {
    color: #333;
    font-family: 'Courier New', monospace;
}

.task-schedule {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #495057;
}

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

.task-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.task-progress {
    margin-bottom: 15px;
}

.progress-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-fill.running {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-fill.stopped {
    background: #6c757d;
}

.progress-fill.error {
    background: #dc3545;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.tasks-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* 响应式设计 - 任务管理页面 */
@media (max-width: 768px) {
    .tasks-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tasks-title-section {
        gap: 10px;
    }
    
    .group-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .group-selector select {
        min-width: auto;
    }
    
    .current-group-info {
        margin-left: 0;
        text-align: center;
    }
    
    .tasks-actions {
        justify-content: center;
    }
    
    .tasks-filters {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .task-card {
        padding: 15px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .task-status {
        align-self: flex-start;
        margin-left: 0;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .tasks-pagination {
        flex-direction: column;
        gap: 10px;
    }
}

/* 配置说明样式 */
.config-help {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.help-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.help-header i {
    color: #007bff;
}

.help-content ol {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
    line-height: 1.6;
}

.help-content li {
    margin-bottom: 8px;
}

.help-content strong {
    color: #495057;
} 

/* 多行按钮区块样式 */
.msg-btn-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background: #f7f7fa;
  border-radius: 4px;
  padding: 6px 8px;
  border: 1px solid #e0e0e0;
  overflow-x: auto;
  max-width: 100%;
  min-height: 48px;
  position: relative;
}
.msg-btn-row .btn {
  margin-right: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.msg-btn-row .btn:last-child {
  margin-right: 0;
}
.msg-btn-item {
  display: inline-block;
}
#msgButtonsArea {
  margin-bottom: 8px;
}
.msg-btn {
  max-width: 160px;
  white-space: normal;
  word-break: break-all;
  cursor: grab;
  user-select: none;
}
.msg-btn:active {
  cursor: grabbing;
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 空行的特殊样式 */
.msg-btn-row:has(.btn-danger) {
  background: #fff5f5;
  border-color: #fed7d7;
}

/* 删除按钮样式 */
.msg-btn-row .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
  animation: pulse-red 2s infinite;
}

.msg-btn-row .btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: scale(1.05);
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

/* 拖动手柄样式 */
.row-drag-handle {
  cursor: grab;
  font-size: 18px;
  color: #888;
  margin-right: 10px;
  user-select: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}
.row-drag-handle:active {
  cursor: grabbing;
  color: #333;
}

/* Sortable拖动时的样式 */
.sortable-ghost {
  opacity: 0.5;
  background: #e3f2fd !important;
  border: 2px dashed #2196f3 !important;
}

.sortable-chosen {
  background: #fff3e0 !important;
  border: 2px solid #ff9800 !important;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
}

.sortable-drag {
  opacity: 0.8;
  transform: rotate(5deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
} 

/* 高级设置Tab样式 */
.tab-group {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid #e5e6eb;
  margin-bottom: 0;
  background: transparent;
}
.tab-btn {
  background: none;
  border: none;
  outline: none;
  padding: 10px 24px 8px 24px;
  font-size: 15px;
  color: #888;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 2.5px solid transparent;
  transition: color 0.2s, border-bottom 0.2s, background 0.2s;
  margin-bottom: -1.5px;
}
.tab-btn.active, .tab-btn:focus {
  color: #3b6cff;
  background: #fff;
  border-bottom: 2.5px solid #3b6cff;
  z-index: 2;
}
.tab-btn:not(.active):hover {
  color: #222;
  background: #f5f6fa;
}

/* Tab内容区域样式 */
#periodTabContent {
  background: #fff;
  border: 1.5px solid #e5e6eb;
  border-radius: 8px;
  margin-top: 8px;
  padding: 24px 18px 18px 18px;
  min-height: 80px;
  box-sizing: border-box;
}

/* 让tab和内容区整体有圆角和阴影 */
#advancedSettings {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  background: #fafbfc;
  padding: 18px 12px 12px 12px;
  border: 1.5px solid #e5e6eb;
  margin-top: 10px;
}

/* 下拉框美化 */
#periodTabContent select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #222;
  margin-top: 8px;
  margin-bottom: 8px;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23888" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
#periodTabContent select:focus {
  border-color: #3b6cff;
  outline: none;
} 

/* 删除方式下拉框美化 */
#msgDeleteType {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #222;
  margin-top: 8px;
  margin-bottom: 8px;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23888" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
#msgDeleteType:focus {
  border-color: #3b6cff;
  outline: none;
}

/* 顶置消息switch美化 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
  margin-left: 8px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #e5e6eb;
  border-radius: 24px;
  transition: .3s;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: .3s;
}
.switch input:checked + .switch-slider {
  background: #3b6cff;
}
.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* 顶置消息label对齐 */
.form-group .switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #222;
  margin-top: 8px;
} 

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.message-info {
    background-color: #2196F3;
}

.message-success {
    background-color: #4CAF50;
}

.message-error {
    background-color: #f44336;
}

.message-warning {
    background-color: #ff9800;
}

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

/* 无数据提示样式 */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}

.no-data p {
    font-size: 1.1rem;
    margin: 0;
} 

/* 图片预览删除按钮样式 */
.img-delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 20px;
  z-index: 2;
  transition: background 0.2s;
}
.img-delete-btn:hover {
  background: #e74c3c;
} 

/* 推送统计信息样式 */
.stats-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
}

.stat-icon.success {
    background: #d4edda;
    color: #155724;
}

.stat-icon.error {
    background: #f8d7da;
    color: #721c24;
}

.stat-icon.info {
    background: #d1ecf1;
    color: #0c5460;
}

.stat-icon.primary {
    background: #cce5ff;
    color: #004085;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* 任务信息样式 */
.task-name {
    font-size: 16px;
    color: #007bff;
    font-weight: 500;
}

/* 推送状态样式 */
.push-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.push-status.success {
    background: #d4edda;
    color: #155724;
}

.push-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* 错误信息样式 */
.detail-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-right: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
} 

/* 伪禁用按钮样式 */
.btn[data-disabled="true"] {
  background: #bdc3c7 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  pointer-events: auto;
  box-shadow: none !important;
} 

#keywordMode {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #222;
  margin-top: 8px;
  margin-bottom: 8px;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23888" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
#keywordMode:focus {
  border-color: #3b6cff;
  outline: none;
} 

.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 40px;
  border: 1.5px solid #b7d7a8;
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
}
.tags-input-container input[type="text"] {
  border: none;
  outline: none;
  flex: 1;
  min-width: 60px;
  font-size: 15px;
  background: transparent;
  margin-left: 4px;
  margin-bottom: 2px;
}
.tag {
  display: flex;
  align-items: center;
  background: #c6e5a6;
  color: #333;
  border: 1.5px solid #a3c97a;
  border-radius: 4px;
  padding: 2px 8px 2px 6px;
  margin: 2px 4px 2px 0;
  font-size: 15px;
  position: relative;
  transition: background 0.2s, border 0.2s;
}
.tag .tag-remove {
  margin-left: 4px;
  color: #7a9c4a;
  cursor: pointer;
  font-size: 15px;
  transition: color 0.2s;
}
.tag .tag-remove:hover {
  color: #e74c3c;
} 