:root {
  --primary: #0c8608;
  --primary-soft: rgba(12, 134, 8, 0.12);
  --secondary: #1b5e20;
  --bg: #f4f6f8;
  --card: #ffffff;
  --card-soft: #f9fafb;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #d32f2f;
  --success: #2e7d32;
  --shadow-lg: 0 30px 70px rgba(0,0,0,0.12);
  --shadow-sm: 0 10px 25px rgba(0,0,0,0.08);
}


/* RESET */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #e8f5e9, transparent 40%),
    linear-gradient(135deg, #eef7f0, var(--bg));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  color: var(--text);
}

.form-container {
  margin-top: 20px;
  width: 100%;
  max-width: 720px;
  background: linear-gradient(180deg, #ffffff, #fcfcfc);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(255,255,255,0.6);
}


/* HEADER */
.form-header {
  text-align: center;
  margin-bottom: 18px;
  margin-top: 18px;
}

.form-header img {
  width: 130px;
  display: block;         
  margin: 0 auto 10px auto;
}

.form-header h2 {
  margin: 10px 0 4px;
  font-size: 24px;
  letter-spacing: -0.4px;
}

.form-header p {
  color: var(--muted);
  font-size: 14px;
}

/* STEP INDICATOR */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.step {
  width: 12px;
  height: 12px;
  background: #d1d5db;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

.step.active {
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-soft);
}

/* STEPS */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step h3 {
  margin-bottom: 15px;
}

.form-step h4 {
  margin: 15px 0 8px;
}

/* LABELS */
label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

/* INPUTS */
input,
select {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  transition: all 0.25s ease;
}

input:hover,
select:hover {
  border-color: #cbd5e1;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* READONLY (REVIEW) */
input[readonly] {
  background: #f9fafb;
  color: #374151;
}

/* RADIO GROUP */
.radio-group {
  display: flex;
  gap: 24px;
  margin: 18px 0 24px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* BUTTONS */
.btn {
  padding: 11px 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.97);
}

.next-btn {
  background: linear-gradient(135deg, #0c8608, #139b0f);
  color: #fff;
}

.prev-btn {
  background: #eef2f7;
  color: #1f2937;
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #fff;
  font-size: 16px;
}

.submit-btn:hover {
  background: #164a19;
}

/* BUTTON LAYOUT */
.form-step .btn {
  width: 48%;
}

.form-step .submit-btn {
  width: 100%;
}

/* ERROR STATES */
.error {
  font-size: 13px;
  color: var(--danger);
  margin-top: -8px;
  margin-bottom: 12px;
}

input.invalid {
  border-color: var(--danger);
}

input.valid {
  border-color: var(--success);
}

/* REVIEW SEPARATOR */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* UTILITIES */
.hidden {
  display: none;
}

/* MOBILE */
@media (max-width: 600px) {
  .form-container {
    padding: 20px;
    margin-top: 50px;
  }

   .form-header h2 {
    font-size: 20px;
  }

   .step-indicator {
    gap: 10px;
  }

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .form-step .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* REVIEW CARDS */
.review-card {
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.review-card h4 {
  margin-bottom: 12px;
  font-size: 15px;
}

.review-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.review-row:last-child {
  border-bottom: none;
}

.review-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--primary);
}

/* SUBMIT SPINNER */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#successStep {
  text-align: center;
  padding: 40px 20px;
}

#successStep h3 {
  font-size: 26px;
  color: var(--success);
  margin-bottom: 10px;
}

.success-message {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 25px;
}

.info-text {
  font-size: 14px;
  margin-top: 6px;
}

.info-text.error {
  color: var(--danger);
}

.info-text.success {
  color: var(--success);
}

.radio-group.error {
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px;
}

.status-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #1b5e20;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.status-btn:hover {
  background: #164a19;
}

/* Mobile adjustment */
@media (max-width: 600px) {
  .status-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 13px;
    padding: 10px 14px;
  }

  .dashboard-btn {
  position: absolute;
  top: 90px;
  
}
}

.dashboard-btn {
  position: absolute;
  top: 45px;
  left: 20px;
  z-index: 2000;
  background: #0c8608;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.dashboard-btn:hover {
  background: #086505;
  transform: translateY(-2px);
}

/* ================= MODAL OVERLAY ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 10px;
}

/* ================= MODAL CARD ================= */
.modal-content {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  animation: fadeInUp 0.25s ease;
  box-sizing: border-box;
}

/* ================= TEXT ================= */
.modal-content h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #444;
  margin-bottom: 14px;
}

/* ================= ACTION BUTTONS ================= */
.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions button {
  flex: 1;
  padding: 10px 0;
  font-size: 0.9rem;
  border-radius: 8px;
}

/* ================= MOBILE OPTIMIZATION ================= */
@media (max-width: 480px) {
  .modal-content {
    max-width: 100%;
    padding: 16px 14px;
  }

  .modal-content h3 {
    font-size: 1rem;
  }

  .modal-content p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }
}

/* ================= ANIMATION ================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

.navbtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* Button base */
.navbtn .btn {
  padding: 12px 18px;
  font-size: 0.95rem;
  border-radius: 8px;
  white-space: nowrap;
}

/* Push extremes */
.dashboard-btn {
  margin-right: auto;
}

.status-btn {
  margin-left: auto;
}

/* ===== MOBILE VIEW ===== */
@media (max-width: 600px) {
  .navbtn {
    flex-direction: column;
    align-items: stretch;
  }

  .navbtn .btn {
    width: 100%;
    text-align: center;
  }

  /* Push View Dashboard downward */
  .dashboard-btn {
    margin-top: 16px;
  }

  .status-btn {
    margin-top: 0;
  }
}

.disabled-input {
  background-color: #f3f3f3;
  cursor: not-allowed;
}
