.task-planner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
}

/* 消息提示 */
.planner-message {
    padding: 8px 16px;
    font-size: 12px;
    text-align: center;
    border-radius: 0;
}

.planner-message.success {
    background: rgba(82, 196, 26, 0.2);
    color: #52c41a;
}

.planner-message.error {
    background: rgba(245, 34, 45, 0.2);
    color: #f5222d;
}

/* 标题行 */
.planner-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #2d2d2d;
}

.planner-title {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    color: #e0e0e0;
    border-radius: 4px;
}

.planner-title:focus {
    border-color: #2563eb;
    background: #222;
    outline: none;
}

.planner-title-row .complete-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.planner-title-row .complete-btn:hover {
    background: linear-gradient(135deg, #73d13d 0%, #52c41a 100%);
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.4);
}

.planner-title-row .complete-btn svg {
    opacity: 0.9;
}

/* 主体区域 - 三栏布局 */
.planner-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 通用面板头部 */
.panel-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    background-color: #252526;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态提示 */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
}

/* ========== 左侧：步骤列表 ========== */
.planner-steps {
    width: 220px;
    min-width: 180px;
    background-color: #181818;
    border-right: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
}

.steps-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.step-item:hover {
    background-color: #2b2b2b;
    border-color: #3d3d3d;
}

.step-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.step-number {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 4px;
}

.step-item.active .step-number {
    color: rgba(255, 255, 255, 0.8);
}

.step-name {
    font-size: 13px;
    color: #d4d4d4;
    line-height: 1.4;
    word-break: break-all;
}

.step-item.active .step-name {
    color: #fff;
    font-weight: 500;
}

/* ========== 中间：一级标题列表 ========== */
.planner-categories {
    width: 240px;
    min-width: 200px;
    background-color: #1a1a1a;
    border-right: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
}

.categories-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.planner-categories .category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.planner-categories .category-item:hover {
    background-color: #2b2b2b;
    border-color: #3d3d3d;
}

.planner-categories .category-item.active {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    border-color: #14b8a6;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.category-title {
    font-size: 14px;
    color: #d4d4d4;
    font-weight: 500;
}

.planner-categories .category-item.active .category-title {
    color: #fff;
}

.category-count {
    font-size: 12px;
    color: #666;
    background: #2d2d2d;
    padding: 2px 8px;
    border-radius: 10px;
}

.planner-categories .category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* ========== 右侧：参数详情 ========== */
.planner-params {
    flex: 1;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.params-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 表头 */
.params-table-header {
    display: flex;
    background-color: #252526;
    border-bottom: 1px solid #333;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    color: #cccccc;
    flex-shrink: 0;
}

/* 参数行 */
.param-row {
    display: flex;
    border-bottom: 1px solid #2d2d2d;
    padding: 10px 16px;
    align-items: center;
    font-size: 13px;
    transition: background-color 0.1s;
    flex-shrink: 0;
}

.param-row:last-child {
    border-bottom: none;
}

.param-row:hover {
    background-color: #252526;
}

/* 列样式 */
.planner-params .col-name {
    flex: 1;
    min-width: 120px;
    padding-right: 12px;
    color: #d4d4d4;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planner-params .col-desc {
    flex: 2;
    padding-right: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planner-params .col-value {
    flex: 1.5;
    min-width: 150px;
}

/* 输入框 */
.param-input {
    width: 100%;
    background-color: #2d2d2d;
    border: 1px solid #3e3e42;
    color: #d4d4d4;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.param-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.param-input::placeholder {
    color: #666;
}

/* ========== 分组面板样式 ========== */
.group-panel {
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #1e1e1e;
    overflow: hidden;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.group-header {
    background-color: #2d2d2d;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
    user-select: none;
}

.group-header:hover {
    background-color: #383838;
}

.group-header::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.2s;
    opacity: 0.7;
}

.group-panel.collapsed .group-header::after {
    transform: rotate(-90deg);
}

.group-body {
    border-top: 1px solid #333;
}

.group-panel.collapsed .group-body {
    display: none;
}

/* 表头样式 */
.attr-table-header {
    display: flex;
    background-color: #252526;
    border-bottom: 1px solid #333;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 12px;
    color: #999;
}

.attr-row {
    display: flex;
    border-bottom: 1px solid #2d2d2d;
    padding: 8px 15px;
    align-items: center;
    font-size: 13px;
    transition: background-color 0.1s;
}

.attr-row:last-child {
    border-bottom: none;
}

.attr-row:hover {
    background-color: #252526;
}

/* 列样式 */
.col-name {
    flex: 1;
    min-width: 120px;
    padding-right: 10px;
    color: #d4d4d4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-desc {
    flex: 1.5;
    padding-right: 10px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-value {
    flex: 1.5;
    min-width: 150px;
}

.attr-input {
    width: 100%;
    background-color: #2d2d2d;
    border: 1px solid #3e3e42;
    color: #d4d4d4;
    padding: 5px 8px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}

.attr-input:focus {
    outline: none;
    border-color: #2563eb;
}

.attr-input:disabled {
    background-color: #252526;
    color: #666;
    cursor: not-allowed;
}

.attr-input::placeholder {
    color: #555;
}

/* ========== 空状态垂直布局 ========== */
.empty-state-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

.empty-state-vertical svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-vertical .hint {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
}

/* ========== 步骤计数和已配置标记 ========== */
.step-count {
    font-weight: normal;
    color: #888;
    margin-left: 6px;
}

.has-data-badge {
    font-size: 11px;
    color: #52c41a;
    background: rgba(82, 196, 26, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.planner-categories .category-item.has-params {
    border-left: 3px solid #52c41a;
}

.planner-categories .category-item.active.has-params {
    border-left-color: rgba(255, 255, 255, 0.5);
}

.planner-categories .category-item.active .has-data-badge {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* params-content 内的边距 */
.params-content {
    padding: 12px;
}
