body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #333;
    margin-top: 0;
}

h1 {
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.inline label {
    margin-bottom: 0;
    white-space: nowrap;
}

.form-group.inline input {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

#taskList {
    margin-top: 30px;
}

.task-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.task-item.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.task-item h3 {
    margin-top: 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.task-item p {
    margin: 8px 0;
    color: #666;
}

.task-item .task-info h3, 
.task-item .task-info p {
    margin: 0;
}

.task-pause-status {
    color: green !important;
    font-weight: bold;
    margin: 5px 0;
}

.task-item .task-info {
    flex-grow: 1;
    margin-right: 15px;
}

.task-item .task-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    width: 140px;
}

.task-item .view-workflow, .task-item .modify-title-btn {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

.hidden {
    display: none;
}

.header-buttons {
    text-align: right;
    margin-bottom: 20px;
}

.header-buttons button {
    margin-left: 10px;
    padding: 12px;
}

.logout-btn {
    background-color: #dc3545;
}

.logout-btn:hover {
    background-color: #c82333;
}

#loading {
    text-align: center;
    padding: 20px;
    color: #007bff;
}

/* 操作按钮 */
.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.action-buttons button, #addTaskForm button, #modifyUserForm button {
    flex: 1;
    padding: 12px;
}

#selectAllBtn {
    background-color: #28a745;
    padding: 12px;
}

#selectAllBtn:hover {
    background-color: #218838;
}

.delete-selected {
    background-color: #dc3545;
}

.delete-selected:hover {
    background-color: #c82333;
}

.run-selected {
    background-color: #28a745;
}

.run-selected:hover {
    background-color: #218838;
}

/* 流程对话框样式 */
.workflow-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.workflow-dialog-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.workflow-dialog-content h2 {
    margin-top: 0;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 0 10px;
    }
    
    .form-group.inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group.inline label {
        margin-bottom: 5px;
    }
    
    .header-buttons {
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .header-buttons button {
        margin: 0;
        padding: 8px;
        font-size: 14px;
        width: 100%;
    }

    .task-item {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }
    
    .task-item .task-info {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .task-item .task-buttons {
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .task-item .view-workflow, .task-item .modify-title-btn {
        width: 50%;
        padding: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons button {
        padding: 12px;
        font-size: 16px;
    }
    
    h1, h2 {
        font-size: 22px;
    }
}
