* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: #f4f7f6;
  color: #333;
  padding: 15px;
}

.container {
  max-width: 950px;
  margin: 0 auto;
}

.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #555;
  font-weight: bold;
  background: #e0e6ed;
  padding: 10px 16px;
  border-radius: 8px;
  transition: 0.2s;
  font-size: 0.9rem;
}

.back-btn:hover { background: #ced4da; }

.header { text-align: center; margin-bottom: 30px; }
.header h1 { color: #2c3e50; font-weight: 800; font-size: 1.8rem;}
.header p { color: #7f8c8d; font-size: 0.9rem; margin-top: 5px; }

.content-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-section, .result-section {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 320px;
}

.input-group {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e0e0e0;
}

.input-group h3 {
  font-size: 1.1rem;
  color: #3498db;
  margin-bottom: 15px;
}

.row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.row label, .sub-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

input, select {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
  background-color: #fff;
  width: 100%;
}

input:focus, select:focus { border-color: #3498db; }

input[readonly] {
  background-color: #e9ecef;
  color: #2c3e50;
  font-weight: bold;
  cursor: not-allowed;
}

.multiple { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.multiple label { width: 120px; margin-bottom: 0; flex-shrink: 0; }
.multiple input { flex: 1; min-width: 0; }

.multiple3 { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.multiple3 label { width: 120px; margin-bottom: 0; flex-shrink: 0; line-height: 1.2; }
.multiple3 input { flex: 1; min-width: 0; text-align: center; }

/* Grid 6 Input untuk SOH & SK */
.input-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.input-grid-6 input { text-align: center; padding: 12px 2px; font-size: 0.9rem;}

.btn-generate, .btn-copy {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

.btn-generate { background: #3498db; margin-top: 10px; }
.btn-generate:hover { background: #2980b9; transform: translateY(-2px); }

.btn-copy { background: #27ae60; margin-top: 15px; }
.btn-copy:hover { background: #219150; transform: translateY(-2px); }

textarea {
  width: 100%;
  height: 400px;
  padding: 15px;
  border: 2px solid #ecf0f1;
  border-radius: 10px;
  font-family: monospace;
  font-size: 0.95rem;
  resize: none;
  outline: none;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.5;
}

/* Responsif untuk Layar HP */
@media (max-width: 600px) {
  .content-wrapper { flex-direction: column; }
  .multiple { flex-direction: column; align-items: stretch; gap: 5px; }
  .multiple label { width: 100%; margin-bottom: 2px; }
  .multiple input { width: 100%; }
  
  .multiple3 { flex-direction: column; align-items: stretch; gap: 5px; }
  .multiple3 label { width: 100%; margin-bottom: 2px; }
  
  /* Grid berubah jadi 3 di atas, 3 di bawah saat di HP */
  .input-grid-6 {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 8px;
  }
}
.hidden {
  display: none !important;
}