/* 全局样式 */
* {
    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 16px;
    min-width: 88px;
    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;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.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;
}

.checkbox-row { display:flex; align-items:center; gap:8px; }
.checkbox-row input[type="checkbox"] { width:auto; height:auto; }
.checkbox-row .checkbox-label { margin:0; font-weight:400; color:#333; }
/* 表单样式 */
.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;
    white-space: pre-wrap;
}

.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: #fff;
    font-weight: 600;
    z-index: 10010; /* 提高层级避免被其它元素覆盖 */
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.2s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    opacity: 0.98;
    border: 1px solid rgba(255,255,255,0.15);
}
.notification.show { transform: translateX(0); }
.notification.success { background-color: #28a745; }
.notification.error { background-color: #dc3545; }
.notification.info { background-color: #17a2b8; }
.notification.warning { background-color: #ffc107; color: #fff; border-color: rgba(0,0,0,0.08); }

/* 返回按钮样式 */
.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;
    display: flex;
    gap: 12px;
    align-items: center; /* 保证同一行垂直居中对齐 */
}

/* 优化日志筛选控件整体间距 */
.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; gap:8px; padding:6px; border:1px solid #ddd; border-radius:8px; background:#fff; }
.tags-input-container input { border:none; outline:none; flex:1; min-width:160px; padding:6px 8px; }
.tags-input-container .tag { display:inline-flex; align-items:center; gap:6px; background:#f1f3f5; color:#495057; border-radius:20px; padding:6px 10px; font-size:12px; }
.tags-input-container .tag .remove { cursor:pointer; color:#888; }
.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;
} 

/* 统一美化选择框（用户管理等页面通用） */
.pretty-select {
  min-width: 140px;
  padding: 10px 12px;
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #222;
  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;
}
.pretty-select:focus {
  border-color: #3b6cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,108,255,0.08);
}
/* 弹窗内的美化选择框占满容器宽度 */
.modal .pretty-select {
  width: 100%;
}

/* 用户管理表格更和谐的间距和按钮排版 */
.data-table {
  width: 100%;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.data-table thead th {
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 10px 12px;
}
.data-table tbody tr {
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.data-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid #f1f2f6;
}
.data-table tbody tr:first-child td { border-top: none; }

/* 表内输入统一样式 */
.data-table input[type="text"], .data-table input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  font-size: 14px;
}
.data-table input:focus {
  border-color: #3b6cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,108,255,0.08);
}

/* 行内操作按钮间距 */
.data-table .btn { margin-right: 8px; }
.data-table .btn:last-child { margin-right: 0; } 

/* 表格内用户名输入（带图标） */
.input-with-icon {
  position: relative;
}
.input-with-icon i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0a0a0;
  font-size: 14px;
}
.table-input {
  width: 100%;
  padding: 8px 10px 8px 28px; /* 预留图标位置 */
  border: 1.5px solid #e5e6eb;
  border-radius: 6px;
  font-size: 14px;
}
.table-input:focus {
  border-color: #3b6cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,108,255,0.08);
}

/* 操作按钮组（紧凑布局） */
.action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-compact {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
} 

/* 全局锁定遮罩（普通用户） */
.lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.lock-modal {
  width: min(92vw, 560px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  padding: 28px 24px;
  text-align: center;
}
.lock-modal h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #333;
}
.lock-modal p {
  color: #666;
  line-height: 1.7;
}
.lock-modal .lock-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 28px;
}
.body-locked {
  overflow: hidden;
}
.container.locked-blur {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
} 

/* 统一状态标签样式（运行/暂停/启用/禁用） */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
}
.status-badge.running { background: #27ae60; }
.status-badge.paused  { background: #e74c3c; } 

/* 状态标签（浅底+深色文字风格） - 覆盖 */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  border: 1px solid transparent;
}
/* 运行中（启用） */
.status-badge.running {
  background: #D4EDDA;   /* 浅绿色底 */
  color: #155724;        /* 深绿色字 */
  border-color: #C3E6CB; /* 浅绿色边 */
}
/* 已停止（禁用） */
.status-badge.paused {
  background: #FAD7D7;   /* 浅粉底 */
  color: #A94442;        /* 深红字 */
  border-color: #F5C6CB; /* 浅粉边 */
} 

.verification-settings-card {
  position: relative;
}
.verification-settings-card.disabled {
  opacity: 0.6;
  pointer-events: none;
}
.action-buttons.disabled {
  opacity: 0.6;
}
.verification-settings-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 18px;
}
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.settings-grid .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.settings-grid .form-group .form-control,
.settings-grid .form-group input[type="number"],
.settings-grid .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}
.help-text {
  display: block;
  margin-top: 6px;
  color: #888;
  font-size: 12px;
}
.settings-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
} 

.form-control {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.form-control:focus {
  border-color: #b3c7ff;
  box-shadow: 0 0 0 3px rgba(102,153,255,0.15);
}

/* 群组积分相关样式 */
.points-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #8b4513;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.level-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border-radius: 12px;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-info .username {
  font-weight: 600;
  color: #333;
}

.user-info .user-id {
  color: #888;
  font-size: 11px;
}

/* 积分排行榜表格样式 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

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

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

/* 积分操作按钮样式 */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.action-icons{display:flex; gap:8px; align-items:center;}
.icon-btn{background:#f5f7fa;border:1px solid #e5e7eb;border-radius:6px;padding:6px 10px;cursor:pointer;color:#333;}
.icon-btn:hover{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5;}
.icon-btn.btn-danger{color:#b91c1c;border-color:#fecaca;background:#fff1f2;}
.icon-btn.btn-danger:hover{background:#fee2e2;}
/* 表格容器 */
.table-link{color:#409eff;cursor:pointer;text-decoration:underline;}
.table-container {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
} 

/* 群组积分页面按钮布局修正 */
.verification-settings-card .form-group > div.inline-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.verification-settings-card .form-group > div.inline-actions .btn {
	flex: 0 0 auto;
} 

/* 抽奖类型横向卡片式单选 */
.lottery-type-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.lottery-type-options .radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #e5e6eb;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .1s ease;
  flex: 1 1 48%;
  min-width: 280px;
}
.lottery-type-options .radio-card:hover {
  border-color: #b3c7ff;
  box-shadow: 0 4px 14px rgba(59,108,255,0.08);
}
.lottery-type-options .radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.lottery-type-options .radio-card .radio-card-content {
  display: flex;
  flex-direction: column;
}
.lottery-type-options .radio-title {
  font-weight: 600;
  color: #2c3e50;
}
.lottery-type-options .radio-desc {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 4px;
}
/* 选中态高亮：利用 :has() 提升视觉（不支持则保持默认） */
@supports(selector(:has(*))) {
  .lottery-type-options .radio-card:has(input[type="radio"]:checked) {
    border-color: #3b6cff;
    box-shadow: 0 0 0 3px rgba(59,108,255,0.10);
  }
}

/* 时间选择器统一风格 */
.flatpickr-calendar {
  border: 1px solid #e5e6eb !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
  border-radius: 10px !important;
}
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
  background: #3b6cff !important;
  border-color: #3b6cff !important;
}
#timedOpenAt.form-control {
  background: #fff;
  border: 1.5px solid #e5e6eb;
  border-radius: 8px;
}
#timedOpenAt.form-control:focus {
  border-color: #3b6cff;
  box-shadow: 0 0 0 3px rgba(59,108,255,0.08);
  outline: none;
}

/* 弹窗内的"按钮行为"横向紧凑排列（仅作用于按钮编辑弹窗） */
#editLotteryButtonModal .lottery-type-options {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}
#editLotteryButtonModal .lottery-type-options .radio-card {
  flex: 1 1 50%;
  min-width: 0;
  padding: 10px 12px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* 图片预览容器与图片样式（用于所有弹窗） */
.img-preview-wrap{ position: relative; display:inline-block; }
.img-preview-pic{ max-width:180px; max-height:120px; border:1px solid #eee; border-radius:8px; display:block; }

#participantsModal .modal-content { width: 96%; max-width: 860px; }
#participantsModal .modal-header .close {
  appearance: none;
  background: #f5f5f7;
  border: 1px solid #e1e3e6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #666;
  transition: all .15s ease;
}
#participantsModal .modal-header .close:hover {
  background: #fff;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

#fixedListModal .modal-header .close {
  appearance: none;
  background: #f5f5f7;
  border: 1px solid #e1e3e6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #666;
  transition: all .15s ease;
}
#fixedListModal .modal-header .close:hover { background:#fff; color:#333; box-shadow:0 2px 6px rgba(0,0,0,.08); }

#participantsTable select.pickPrize {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 6px 28px 6px 10px;
  border: 1px solid #d6dae1;
  border-radius: 8px;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%23666"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center/14px;
  height: 32px;
  line-height: 20px;
  font-size: 14px;
  color: #333;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#participantsTable select.pickPrize:focus {
  outline: none;
  border-color: #4c8dff;
  box-shadow: 0 0 0 3px rgba(76,141,255,.15);
}
#participantsTable select.pickPrize:hover { border-color: #b9bec6; }

#fixedListModal .modal-content { width: 96%; max-width: 900px; }

#participantsModal .modal-body .btn {
  min-width: 110px;
  height: 36px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
#participantsModal #applyBatchPrize{
  background: #f8f9fb;
  border: 1px solid #e3e6ee;
  color: #334155;
}
#participantsModal #applyBatchPrize:hover{
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,.18);
  transform: translateY(-1px);
}
#participantsModal #viewFixedBtn{
  background: #f8f9fb;
  border: 1px solid #e3e6ee;
  color: #334155;
}
#participantsModal #viewFixedBtn:hover{
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14,165,233,.18);
  transform: translateY(-1px);
}
#participantsModal #saveFixedBtn{
  background: linear-gradient(135deg,#667eea 0%, #764ba2 100%);
  color: #fff;
}
#participantsModal #saveFixedBtn:hover{
  box-shadow: 0 6px 16px rgba(102,126,234,.35);
  transform: translateY(-1px);
}
#participantsModal .btn[disabled],
#participantsModal .btn[data-disabled="true"]{
  background: #e5e7eb !important;
  color: #9ca3af !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* 已中奖名单弹窗与内定名单弹窗保持一致宽度与关闭按钮样式 */
#winnersListModal .modal-content { width: 96%; max-width: 900px; }
#winnersListModal .modal-header .close {
  appearance: none;
  background: #f5f5f7;
  border: 1px solid #e1e3e6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #666;
  transition: all .15s ease;
}
#winnersListModal .modal-header .close:hover { background:#fff; color:#333; box-shadow:0 2px 6px rgba(0,0,0,.08); }

/* 已中奖名单按钮：显眼的可点击风格 */
#participantsModal #viewWinnersListBtn{
  background: #f8f9fb;
  border: 1px solid #e3e6ee;
  color: #374151;
}
#participantsModal #viewWinnersListBtn:hover{
  background: #ecfdf5;          /* 绿色浅底 */
  border-color: #bbf7d0;        /* 绿色边 */
  color: #059669;               /* 绿色字 */
  box-shadow: 0 4px 12px rgba(5,150,105,.18);
  transform: translateY(-1px);
}

/* 设置到期弹窗专属美化 */
#setExpiryModal .modal-content { border-radius: 14px; box-shadow: 0 12px 48px rgba(31,35,41,.18); }
#setExpiryModal .modal-header { padding: 18px 22px; border-bottom: 1px solid #f0f1f5; }
#setExpiryModal .modal-header h3 { font-size: 16px; font-weight: 600; color: #1f2329; }
#setExpiryModal .modal-body { padding: 18px 22px; }
#setExpiryModal .modal-footer { padding: 14px 22px; border-top: 1px solid #f0f1f5; }
#setExpiryModal .form-group { margin-bottom: 14px; }
#setExpiryModal .form-group label { font-size: 14px; color: #4e5969; }
#setExpiryModal .form-group small { display:block; margin-top:6px; color:#86909c; }
#setExpiryModal .table-input { padding:10px 12px; border:1.5px solid #e5e6eb; border-radius:8px; font-size:14px; }
#setExpiryModal .table-input:focus { border-color:#3b6cff; outline:none; box-shadow:0 0 0 3px rgba(59,108,255,0.08); }
#setExpiryModal .radio-row { display:flex; align-items:center; gap:8px; font-size:14px; color:#1f2329; }
#setExpiryModal .inline { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

#setExpiryModal .exp-row { display:grid; grid-template-columns: 160px 1fr; align-items:center; gap:12px; padding:6px 0; }
#setExpiryModal .exp-left { display:flex; align-items:center; gap:8px; color:#1f2329; }
#setExpiryModal .exp-right { display:flex; flex-direction:column; gap:6px; }
#setExpiryModal .exp-right .table-input { max-width: 260px; }
#setExpiryModal .exp-right .help { font-size:12px; color:#86909c; }
@media (max-width: 520px) { #setExpiryModal .exp-row { grid-template-columns: 1fr; } #setExpiryModal .exp-right .table-input { max-width:100%; } }

/* Auto-reply filter controls beautify */
.filter-controls{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.filter-controls #searchInput{
	padding: 8px 34px 8px 36px;
	border: 1px solid #e0e3e7;
	border-radius: 10px;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2399a3b3" viewBox="0 0 16 16"><path d="M11 6a5 5 0 1 1-1-3.874L15.5 8.5l-1 1L9 7.126A5 5 0 0 1 11 6zM6 1a5 5 0 1 0 0 10A5 5 0 0 0 6 1z"/></svg>') no-repeat 10px center;
	background-size: 16px 16px;
	min-width: 240px;
	height: 36px;
	outline: none;
	transition: box-shadow .15s ease,border-color .15s ease;
}
.filter-controls #searchInput::placeholder{ color:#9aa6b2; }
.filter-controls #searchInput:focus{
	border-color: #7aa7ff;
	box-shadow: 0 0 0 3px rgba(122,167,255,.25);
}

.filter-controls #statusFilter{
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding: 8px 36px 8px 12px;
	border: 1px solid #e0e3e7;
	border-radius: 10px;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2399a3b3" viewBox="0 0 16 16"><path d="M3 6l5 5 5-5H3z"/></svg>') no-repeat right 10px center;
	background-size: 16px 16px;
	height: 36px;
	color:#333;
	transition: box-shadow .15s ease,border-color .15s ease;
}
.filter-controls #statusFilter:focus{
	border-color:#7aa7ff;
	box-shadow: 0 0 0 3px rgba(122,167,255,.25);
}
.filter-controls #statusFilter:hover{ border-color:#cdd4db; }

/* Beautify for lottery page filter controls (reuse same look) */
.filter-controls #lotterySearch{
	padding: 8px 34px 8px 36px;
	border: 1px solid #e0e3e7;
	border-radius: 10px;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2399a3b3" viewBox="0 0 16 16"><path d="M11 6a5 5 0 1 1-1-3.874L15.5 8.5l-1 1L9 7.126A5 5 0 0 1 11 6zM6 1a5 5 0 1 0 0 10A5 5 0 0 0 6 1z"/></svg>') no-repeat 10px center;
	background-size: 16px 16px;
	min-width: 240px;
	height: 36px;
	outline: none;
	transition: box-shadow .15s ease,border-color .15s ease;
}
.filter-controls #lotterySearch::placeholder{ color:#9aa6b2; }
.filter-controls #lotterySearch:focus{
	border-color: #7aa7ff;
	box-shadow: 0 0 0 3px rgba(122,167,255,.25);
}

.filter-controls #lotteryStatusFilter{
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding: 8px 36px 8px 12px;
	border: 1px solid #e0e3e7;
	border-radius: 10px;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2399a3b3" viewBox="0 0 16 16"><path d="M3 6l5 5 5-5H3z"/></svg>') no-repeat right 10px center;
	background-size: 16px 16px;
	height: 36px;
	color:#333;
	transition: box-shadow .15s ease,border-color .15s ease;
}
.filter-controls #lotteryStatusFilter:focus{
	border-color:#7aa7ff;
	box-shadow: 0 0 0 3px rgba(122,167,255,.25);
}
.filter-controls #lotteryStatusFilter:hover{ border-color:#cdd4db; }