body {
  font-family: Consolas, monospace;
  background-color: #121212;
  color: #e0e0e0;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px 30px;
  border-radius: 10px;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  color: #82cfff;
  margin-bottom: 40px;
  font-weight: 700;
}

label {
  font-weight: 600;
  display: block;
  margin-top: 20px;
  font-size: 16px;
  color: #a0a0a0;
}

input {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1.5px solid #444;
  border-radius: 8px;
  font-size: 15px;
  background-color: #222;
  color: #eee;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  box-sizing: border-box;
}

input::placeholder {
  color: #666;
}

input:focus {
  border-color: #82cfff;
  outline: none;
  background-color: #1a1a1a;
  box-shadow: 0 0 6px #82cfff88;
}

button {
  display: block;
  margin: 30px auto 0 auto;
  padding: 14px 36px;
  background-color: #0083ff;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 8px #0083ffaa;
}

button:hover {
  background-color: #005bb5;
  box-shadow: 0 6px 12px #005bb599;
}

h2 {
  margin-top: 50px;
  text-align: center;
  color: #bbbbbb;
}

pre {
  background-color: #1e1e1e;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #333;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: inset 0 0 10px #000000aa;
  max-height: 400px;
  overflow-y: auto;
  user-select: text;
  color: #cfcfcf;
}

  /* กล่องข้อมูลแยกชัดเจน */
.section-box {
    background-color: #1f1f1f;
    border: 1.5px solid #444;
    border-radius: 10px;
    padding: 15px 25px;
    margin-top: 25px;
}

.section-box h3 {
  color: #82cfff;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  border-bottom: 2px solid #5ac8fa;
  padding-bottom: 5px;
}

  /* ลดช่องว่างใน label/input สำหรับกล่องนี้ */
.section-box label {
  margin-top: 12px;
  color: #a0a0a0;
}

.top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  border: 1px solid #777;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
}

input {
  text-transform: uppercase; /* แสดงใน input เป็นตัวพิมพ์ใหญ่ */
}

.center-text {
  text-align: center;
}

/* ปิดลูกศรใน input type="number" */
input[type="number"] {
  -moz-appearance: textfield; /* ปิดลูกศรใน Firefox */
  appearance: textfield; /* ปิดลูกศรใน Safari, Edge, Chrome */
}

/* ปิดลูกศรใน WebKit (Chrome, Safari, Edge) */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* จัดให้ตอบสนองกับขนาดหน้าจอ */
  gap: 15px; /* เว้นระยะห่างระหว่างแต่ละ input */
}

.form-group {
  display: flex;
  flex-direction: column; /* จัดให้อยู่ในแนวตั้ง */
}

.rtd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

.rtd-field {
  display: flex;
  flex-direction: column;
  width: 130px;
}

.rtd-field input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #1f1f1f;
  color: #fff;
  font-size: 14px;
}

.result-box {
  padding: 8px;
  background-color: #1f1f1f;
  color: #00e676;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #444;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rtd-field.full-width {
  width: 100%;
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #ccc;
}

.radio-group input[type="radio"] {
  margin-right: 6px;
}

.double-row {
  display: flex;
  gap: 40px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.side-nav-right {
  position: fixed;
  top: 15%;
  right: 0;
  transform: translateY(-50%);
  background-color: #1a1a1a;
  border-left: 1px solid #333;
  padding: 10px 8px;
  z-index: 1000;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.side-nav-right ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav-right li {
  margin: 8px 0;
}

.side-nav-right a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.side-nav-right a:hover {
  background-color: #333;
  color: #82cfff;
}

#clearBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #d32f2f;
  color: white;
  border: none;
  padding: 10px 10px;
  font-size: 13px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
  font-family: Consolas, monospace;
}

#clearBtn:hover {
  background-color: #b71c1c;
}

input[readonly] {
  background-color: #333;
  color: #aaa;
  cursor: not-allowed;
}

/* ===== FHL SHP/CNE Left Label ===== */
.fhl-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.fhl-row label {
  margin: 0;
  font-size: 14px;
  color: #a0a0a0;
}

.fhl-row input {
  margin-top: 0;
}