body{
  margin:0;
  background:#e5e3e3;
  font-family:'Noto Sans TC', sans-serif;
}

.container{
  width:1200px;
  margin:12px auto;
  background:#e5e5e5;
  border-radius:10px;
  padding:20px;
}

h1{
  text-align:center;
  margin-bottom:10px;
}

.top-note{
  text-align:center;
  margin-bottom:20px;
  color:#111;
}

.control-bar{
  background:#e9ddc8;
  padding:15px;
  border-radius:8px;
  margin-bottom:15px;
  color:#111;
}

.control-bar input[type=number]{
  width:60px;
  margin:0 6px;
}

.checkbox{
  user-select:none;
}

button{
  cursor:pointer;
  border:none;
  border-radius:6px;
  font-weight:600;
}

button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.btn-primary{
  width:100%;
  background:#cc6a00;
  color:white;
  padding:15px;
  font-size:18px;
  margin-bottom:20px;
}

.btn-green{
  background:#2f5d34;
  color:white;
  padding:10px 16px;
  min-width:120px;
}

.btn-icon{
  background:#8b3c3c;
  color:white;
  padding:6px 10px;
  border-radius:10px;
}

.btn-ghost{
  background:#d8d8d8;
  color:#333;
  padding:10px 16px;
  min-width:120px;
}

input[type=text], input[type=number], textarea{
  padding:10px 12px;
  border-radius:10px;
  border:2px solid #bdbdbd;
  font-family:'Noto Sans TC', sans-serif;
  outline:none;
}

input[type=text]::placeholder, textarea::placeholder{
  color:#9a9a9a;
}

.section{
  background:#f0f0f0;
  padding:20px;
  border-radius:10px;
  margin-top:15px;
}

.row{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:nowrap;
}

.label{
  min-width:160px;
  font-weight:700;
}

#newParamName{
  flex:1;
}

.role-row{
  display:flex;
  justify-content:space-between;
  padding:10px;
  border-bottom:1px solid #ddd;
}

.role-actions{
  display:flex;
  gap:10px;
}

.param-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px;
  border-bottom:1px solid #ddd;
}

.param-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.badge{
  display:inline-block;
  background:#ead8a7;
  color:#4b3b12;
  font-weight:700;
  padding:3px 10px;
  border-radius:10px;
  margin-right:10px;
  font-size:12px;
}

.param-left{
  display:flex;
  align-items:center;
  gap:8px;
}

.toggle{
  width:45px;
  height:22px;
  background:#ccc;
  border-radius:20px;
  position:relative;
  cursor:pointer;
}

.toggle.active{
  background:#2f5d34;
}

.toggle::after{
  content:'';
  width:18px;
  height:18px;
  background:white;
  position:absolute;
  top:2px;
  left:2px;
  border-radius:50%;
  transition:.2s;
}

.toggle.active::after{
  left:25px;
}

.material-symbols-outlined{
  font-size:20px;
  vertical-align:middle;
}

table{
  width:100%;
  border-collapse:collapse;
  margin-top:15px;
  background:#f3f0d6;
}

th, td{
  border:1px solid #ccc;
  padding:10px 8px;
  text-align:center;
  color:#111;
  white-space:nowrap;
}

#resultArea h2{
  margin:8px 0 0;
  color:#111;
}

.fields-wrap{
  margin-top:14px;
  background:#ffffff;
  border-radius:12px;
  padding:18px;
}

.fields-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:16px;
}

.field-row{
  display:flex;
  align-items:center;
  gap:12px;
  max-width:620px;
}

.field-row input{
  width:520px;
}

.btn-field{
  background:#2f5d34;
  color:#fff;
  padding:14px 18px;
  border-radius:10px;
  width:560px;
}

/* bulk import */
.bulk-wrap{
  margin-top:14px;
  background:#ffffff;
  border-radius:12px;
  padding:18px;
}

.bulk-title{
  font-weight:700;
  margin-bottom:10px;
  color:#111;
}

#bulkInput{
  width:100%;
  height:170px;
  resize:none;
  box-sizing:border-box;
}

.bulk-actions{
  margin-top:12px;
  display:flex;
  gap:12px;
}

.hint{
  margin-top:10px;
  color:#2a2a2a;
  font-size:13px;
  opacity:.85;
}
