/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #1e293b;
  padding: 0;
  margin: 0;
}

.top-menu {
  background-color: #2563eb;
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.8rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.menu-container {
  display: flex;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.menu-item {
  flex: 1 1 200px;
  max-width: 280px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  text-align: center;
  color: #64748b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-item .icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.menu-item .title {
  font-weight: 700;
  font-size: 1.2rem;
  color: #2563eb;
}

.menu-item .desc {
  font-size: 0.9rem;
  color: #94a3b8;
}

.menu-item:hover,
.menu-item.active {
  background: #2563eb;
  color: white;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.menu-item:hover .title,
.menu-item.active .title {
  color: white;
}

.content-area {
  max-width: 1100px;
  margin: 2rem auto 4rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 2rem 3rem;
}

.tab-content {
  display: none;
}

.tab-content[style*="display: block"] {
  display: block;
}

/* Progress bar */
.progressbar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2rem;
  user-select: none;
}

.progressbar .progress-step {
  width: 30px;
  height: 30px;
  background: #e2e8f0;
  border-radius: 50%;
  position: relative;
  cursor: default;
  transition: background-color 0.3s ease;
}

.progressbar .progress-step.active,
.progressbar .progress-step[aria-current="step"] {
  background: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.progressbar .progress-step::after {
  content: attr(data-title);
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  width: max-content;
  max-width: 120px;
  text-align: center;
}

/* Progress bar line */
.progressbar::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 4px;
  background: #e2e8f0;
  z-index: 0;
  border-radius: 2px;
}

.progressbar .progress {
  position: absolute;
  top: 15px;
  left: 15px;
  height: 4px;
  background: #2563eb;
  border-radius: 2px;
  z-index: 1;
  width: 0%;
  transition: width 0.3s ease;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.form-step.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 1.5rem 2rem;
  margin-top: 1rem;
}

.form-grid.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #334155;
}

input[type="text"],
input[type="date"],
select,
.input-currency input.currency {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
  color: #1e293b;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
.input-currency input.currency:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.input-currency {
  position: relative;
}

.input-currency input.currency {
  padding-left: 1.5rem;
}

.input-currency input.currency::before {
  content: "Rp";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-weight: 600;
  pointer-events: none;
}

.btn-next,
.btn-prev,
.btn-submit,
.btn-add,
.btn-remove {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
}

.btn-prev {
  background-color: #64748b;
}

.btn-next:hover,
.btn-prev:hover,
.btn-submit:hover,
.btn-add:hover,
.btn-remove:hover {
  background-color: #1d4ed8;
}

.btn-prev:hover {
  background-color: #475569;
}

.btn-remove {
  background-color: #ef4444;
  margin-top: 1.5rem;
  align-self: flex-start;
}

.btn-remove:hover {
  background-color: #dc2626;
}

.btn-add {
  margin-top: 1rem;
  display: inline-block;
}

.step-btns {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.full {
  grid-column: 1 / -1;
}

.focusmodel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
}

.focusmodel-row label {
  flex: 1 1 100%;
}

.focusmodel-row select,
.focusmodel-row input.currency {
  flex: 1 1 150px;
}

.focusmodel-row .form-grid.model {
  display: flex;
  gap: 1rem;
  flex: 1 1 auto;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.review-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.review-table td:first-child {
  font-weight: 600;
  color: #64748b;
  width: 180px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .focusmodel-row {
    flex-direction: column;
    align-items: stretch;
  }

  .focusmodel-row .form-grid.model {
    flex-direction: column;
  }

  .step-btns {
    flex-direction: column;
  }

  .btn-next,
  .btn-prev,
  .btn-submit {
    width: 100%;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-step {
  animation: fadeIn 0.4s ease forwards;
}