* {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden; /* Mencegah scroll horizontal */
}
.navbar {
  width: 100%;
  position: fixed;
  z-index: 100;
  max-width: 1200px; /* Batasi lebar maksimal */
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.navbar .logo {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: white;
}
.navbar .menu {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Wrap jika terlalu banyak */
}
.navbar .menu a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background 0.3s;
  font-weight: 500;
  white-space: nowrap; /* Jaga agar tidak wrap dalam link */
}
.navbar .menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}
.dashboard {
  max-width: 800px;
  width: 100%;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 100px;
}
.header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 700;
}
.header p {
  margin: 10px 0 0;
  font-size: 1.1em;
  opacity: 0.9;
}
.content {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.input-group {
  display: flex;
  flex-direction: column;
}
.input-group label {
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}
input,
select {
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  width: 100%; /* Pastikan lebar penuh */
}
input:focus,
select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
button {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  width: 100%; /* Pastikan lebar penuh */
}
button:hover {
  background: linear-gradient(135deg, #218838 0%, #17a2b8 100%);
  transform: translateY(-2px);
}
button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}
progress {
  width: 100%;
  height: 25px;
  border-radius: 12px;
  background: #e9ecef;
  border: none;
}
progress::-webkit-progress-bar {
  background: #e9ecef;
  border-radius: 12px;
}
progress::-webkit-progress-value {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  border-radius: 12px;
}
progress::-moz-progress-bar {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  border-radius: 12px;
}
.status {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  padding: 10px;
  background: #e9ecef;
  border-radius: 8px;
}
.preview {
  display: none;
  text-align: center;
}
.preview img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.preview h3 {
  font-size: 18px;
  margin: 15px 0 10px;
  color: #333;
}
.preview p {
  font-size: 14px;
  color: #666;
  margin: 5px 0;
}
.loading {
  text-align: center;
  font-size: 16px;
  color: #007bff;
  font-weight: 500;
}

/* Tablet */
@media screen and (max-width: 1024px) {
  .content {
    grid-template-columns: 1fr; /* Satu kolom agar lebih lega */
    gap: 20px;
    padding: 20px;
  }

  .navbar {
    flex-direction: column;
    gap: 10px;
  }

  .navbar .menu {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .header h1 {
    font-size: 2.2em;
  }

  .dashboard {
    margin-top: 150px;
  }
}

/* HP */
@media screen and (max-width: 600px) {
  body {
    padding: 10px;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }

  .navbar .logo {
    font-size: 20px;
  }

  .navbar .menu {
    flex-direction: column;
    gap: 8px;
  }

  .dashboard {
    margin-top: 230px;
    border-radius: 10px;
  }

  .header {
    padding: 15px;
  }

  .header h1 {
    font-size: 1.8em;
  }

  .header p {
    font-size: 1em;
  }

  .card {
    padding: 12px;
  }

  input,
  select,
  button {
    font-size: 14px;
    padding: 10px;
  }

  progress {
    height: 20px;
  }

  .status {
    font-size: 14px;
  }

  .preview img {
    max-width: 100%;
  }
}
