* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", Arial, sans-serif; font-size: 13px; background: #f5f5f5; }

/* 节点下拉框样式 */
.node-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d9d9d9;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.node-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.node-dropdown-item:hover {
    background: #f5f5f5;
}
.node-dropdown-item.selected {
    background: #e6f7ff;
    color: #1890ff;
}

/* 顶部标题和菜单 */
.header {
    background: white;
    padding: 12px 30px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header h1 {
    font-size: 18px;
    color: #333;
    font-weight: normal;
}
.nav-menu {
    display: flex;
    gap: 0;
}
.nav-menu button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}
.nav-menu button:hover { color: #1890ff; }
.nav-menu button.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

/* 主内容区 */
.main {
    padding: 15px 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* 工具栏 */
.toolbar {
    background: white;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 按钮 */
.btn {
    padding: 6px 12px;
    margin-right: 8px;
    border: none;
    background: #1890ff;
    color: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.3s;
}
.btn:hover { background: #40a9ff; }
.btn-success { background: #52c41a; }
.btn-success:hover { background: #73d13d; }
.btn-danger { background: #ff4d4f; }
.btn-danger:hover { background: #ff7875; }
.btn-small { padding: 3px 8px; font-size: 12px; }

/* 表格 */
.table-container {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
th {
    background: #fafafa;
    color: #333;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}
tbody tr:hover { background: #f5f5f5; }

/* 可编辑单元格 */
.editable {
    cursor: pointer;
    position: relative;
    min-width: 80px;
}
.editable:hover {
    background: #e6f7ff;
}
.editable select {
    width: 100%;
    padding: 4px;
    border: 1px solid #1890ff;
    border-radius: 3px;
    font-size: 12px;
}
.editable input {
    width: 100%;
    padding: 4px;
    border: 1px solid #1890ff;
    border-radius: 3px;
    font-size: 12px;
}

/* 表单 */
input, select, textarea {
    padding: 6px 10px;
    font-size: 13px;
    width: 100%;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
    border-color: #40a9ff;
    outline: none;
}
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
}
.modal-content {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 450px;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.modal-header h3 {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}
.close {
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0 8px;
}
.close:hover { color: #333; }
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.modal-footer .btn {
    margin-right: 0;
}

/* Loading 动效 — 仅覆盖数据容器（表格/树），不阻塞导航和筛选栏 */
.loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}
.loading-overlay.show { display: flex; }
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e8e8e8;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loading-text {
    color: #555;
    font-size: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 表格内骨架行 */
.skeleton-row td {
    background: linear-gradient(90deg, #f2f2f2 25%, #e8e8e8 50%, #f2f2f2 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    color: transparent !important;
    border-radius: 3px;
}
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

/* 分步表单样式 */
.step-summary {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.step-summary h4 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}
.step-summary p {
    font-size: 12px;
    color: #333;
    margin: 4px 0;
    line-height: 1.6;
}
