/* Employee Form page enhancements */
/* Modern form styling with cards, better typography, and responsive design */

.employee-form-area {
  scroll-margin-top: 80px;
  background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
  min-height: 100vh;
  padding: 2rem 0;
}

/* Main form container */
.form-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Modern form title */
.form-main-title {
  text-align: center;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 2rem;
  position: relative;
}

.form-main-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* Form sections as cards */
.form-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.form-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Section titles */
.section-title {
  color: var(--primary-color) !important;
  font-weight: 600;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid var(--primary-color-light) !important;
  position: relative;
}

.section-title::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* Modern form controls */
.form-control {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-light);
  background: #ffffff;
  outline: none;
}

/* Modern labels */
.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}

/* Required field indicator */
.required {
  color: #ef4444;
  font-weight: 600;
}

/* Radio button styling */
.radio-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  margin-bottom: 8px;
  font-weight: 400;
}

.radio-inline input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.2);
  accent-color: var(--primary-color);
}

/* Modern table styling */
.table-responsive {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin: 1rem 0;
}

.table {
  margin-bottom: 0;
  background: transparent;
}

.table thead th {
  background: var(--primary-color-ultra-light);
  color: var(--primary-color);
  font-weight: 600;
  border: none;
  padding: 16px 12px;
  font-size: 14px;
}

.table tbody td {
  padding: 12px;
  border-color: #f3f4f6;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: var(--primary-color-ultra-light);
}

/* Modern buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 2px 8px var(--primary-shadow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--primary-shadow);
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
}

/* Signature pad styling */
.signature-section {
  background: var(--primary-color-ultra-light);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px dashed var(--primary-color-light);
}

#signaturePad {
  border: 2px solid var(--primary-color-light);
  border-radius: 8px;
  background: #ffffff;
  width: 100%;
  height: 200px;
  cursor: crosshair;
}

/* Help text */
.help-inline {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
  margin-top: 8px;
  display: block;
}

/* Progress indicator */
.form-progress {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
  z-index: 10;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.progress-step.active {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-step .step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.progress-step.active .step-number {
  background: var(--primary-color);
  color: white;
}

/* Declaration section */
.declaration-section {
  background: linear-gradient(135deg, var(--primary-color-ultra-light), rgba(255,255,255,0.9));
  border-radius: 16px;
  padding: 2rem;
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.declaration-section::before {
  content: '📝';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 24px;
  background: white;
  padding: 8px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Submit section */
.submit-section {
  text-align: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.submit-section::before {
  content: '🚀';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  background: white;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 991px) {
  .form-section {
    padding: 1.5rem;
  }
  
  .progress-steps {
    justify-content: center;
  }
  
  .progress-step {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .employee-form-area {
    padding: 1rem 0;
  }
  
  .form-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }
  
  .section-title {
    font-size: 18px;
    margin-bottom: 1rem !important;
  }
  
  .section-title::before {
    left: -10px;
    width: 3px;
    height: 20px;
  }
  
  .form-control {
    padding: 10px 14px;
  }
  
  .radio-inline {
    display: block;
    margin-bottom: 10px;
  }
  
  .table thead th,
  .table tbody td {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
  
  .form-progress {
    position: static;
    margin-bottom: 1rem;
  }
  
  .progress-steps {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #signaturePad {
    height: 150px;
  }
  
  .declaration-section,
  .submit-section {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 0 10px;
  }
  
  .form-section {
    padding: 0.75rem;
    border-radius: 10px;
  }
  
  .section-title {
    font-size: 16px;
  }
  
  .form-control {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .table-responsive {
    border-radius: 8px;
  }
  
  .table thead th,
  .table tbody td {
    padding: 6px 4px;
    font-size: 12px;
  }
  
  .btn-small {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  #signaturePad {
    height: 120px;
  }
  
  .help-inline {
    font-size: 12px;
  }
  
  .declaration-section::before,
  .submit-section::before {
    font-size: 20px;
    padding: 6px;
  }
}

/* Animation for form sections */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  animation: fadeInUp 0.6s ease-out;
}

.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }
.form-section:nth-child(4) { animation-delay: 0.3s; }
.form-section:nth-child(5) { animation-delay: 0.4s; }
.form-section:nth-child(6) { animation-delay: 0.5s; }

/* Success message styling */
.swal2-popup {
  border-radius: 16px !important;
}

.swal2-confirm {
  background-color: var(--primary-color) !important;
  border-radius: 8px !important;
}
