* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 看板页面样式 */
.dashboard-container {
    min-height: 100vh;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #555;
}

.main-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.stats {
    display: flex;
    gap: 20px;
}

.stats span {
    color: #555;
    font-size: 14px;
}

.stats strong {
    color: #333;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

/* 分栏布局 */
.split-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 320px);
    min-height: 500px;
}

.left-panel {
    width: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.right-panel {
    width: 50%;
    border-left: 2px solid #e9ecef;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.test-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.test-results-header h3 {
    color: #333;
    font-size: 18px;
}

.btn-clear {
    padding: 6px 15px;
    border: 1px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: #dc3545;
    color: white;
}

.test-results-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 14px;
}

.test-result-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.test-result-item.success {
    border-left-color: #28a745;
}

.test-result-item.error {
    border-left-color: #dc3545;
}

.test-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.test-result-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.test-result-time {
    color: #6c757d;
    font-size: 12px;
}

.test-result-message {
    color: #555;
    font-size: 13px;
    margin-top: 5px;
}

.test-result-message.success-msg {
    color: #28a745;
}

.test-result-message.error-msg {
    color: #dc3545;
}

.table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

th {
    font-weight: 600;
    color: #333;
}

td {
    color: #555;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* 分组标题行 */
.group-header {
    background: #e9ecef !important;
    font-weight: 600;
}

.group-header td {
    padding: 10px 12px !important;
}

.group-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.group-count {
    color: #6c757d;
    font-size: 13px;
    font-weight: normal;
}

.channel-row {
    transition: background-color 0.2s;
}

/* 渠道标签 */
.channel-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.channel-tag-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-size: 10px;
    font-weight: 600;
    margin-left: 5px;
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-enabled {
    background: #d4edda;
    color: #155724;
}

.status-disabled {
    background: #f8d7da;
    color: #721c24;
}

.status-auto-disabled {
    background: #fff3cd;
    color: #856404;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-enable {
    background: #28a745;
    color: white;
}

.btn-enable:hover {
    background: #218838;
}

.btn-disable {
    background: #dc3545;
    color: white;
}

.btn-disable:hover {
    background: #c82333;
}

.btn-test {
    background: #17a2b8;
    color: white;
}

.btn-test:hover {
    background: #138496;
}

.btn-test:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.loading {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

@media (max-width: 1200px) {
    .split-layout {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel, .right-panel {
        width: 100%;
    }
    
    .right-panel {
        border-left: none;
        border-top: 2px solid #e9ecef;
        padding-left: 0;
        padding-top: 20px;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}
