/* 机器人管理样式 */

/* Bot 状态卡片 */
#botStatusCards .stat-icon.green {
    background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
}

#botStatusCards .stat-icon.red {
    background: linear-gradient(135deg, #ff3b30 0%, #e6352b 100%);
}

/* Bot 信息网格 */
.bot-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
}

.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 指令统计 */
.commands-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.command-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.command-stat-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.cmd-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.cmd-count {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    background: rgba(0, 113, 227, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

/* 配置表单 */
.config-form {
    max-width: 800px;
}

.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-group input[readonly] {
    background: rgba(245, 245, 247, 0.8);
    color: var(--text-secondary);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
}

.btn-danger {
    padding: 12px 24px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: #ff3b30;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: rgba(255, 59, 48, 0.2);
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active,
.status-badge.allowed {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
}

.status-badge.inactive,
.status-badge.denied {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

/* 日志样式 */
.logs-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.logs-container {
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
}

.log-entry {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #666;
    min-width: 80px;
    flex-shrink: 0;
}

.log-level {
    min-width: 50px;
    font-weight: 600;
    flex-shrink: 0;
}

.log-level.info {
    color: #4fc1ff;
}

.log-level.warn {
    color: #ffcc00;
}

.log-level.error {
    color: #ff6b6b;
}

.log-type {
    color: #888;
    min-width: 60px;
    flex-shrink: 0;
}

.log-message {
    color: #e0e0e0;
    word-break: break-all;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .bot-info-grid {
        grid-template-columns: 1fr;
    }
    
    .logs-header {
        flex-wrap: wrap;
    }
    
    .logs-container {
        font-size: 11px;
        padding: 12px;
    }
    
    .log-entry {
        flex-direction: column;
        gap: 4px;
    }
    
    .log-time,
    .log-level,
    .log-type {
        min-width: auto;
    }
}
