body {
  box-sizing: border-box;
}

.gradient-bg {
  background: linear-gradient(135deg, #912026 0%, #000000 100%);
}

.header-bg {
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.calculator-banner {
  background: linear-gradient(135deg, #912026 0%, #7a1a21 50%, #000000 100%);
  min-height: 400px;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-step {
  position: relative;
  flex: 1;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: #e5e7eb;
  z-index: -1;
}

.progress-step:last-child::after {
  display: none;
}

.progress-step.active .step-circle {
  background: #912026;
  color: white;
  border-color: #912026;
}

.progress-step.completed .step-circle {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.progress-step.completed::after {
  background: #10b981;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.form-stage {
  display: none;
}

.form-stage.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.image-preview {
  max-width: 300px;
  max-height: 200px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: #10b981;
  stroke-miterlimit: 10;
  margin: 20px auto;
  box-shadow: inset 0px 0px 0px #10b981;
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes fill {
  100% { box-shadow: inset 0px 0px 0px 40px #10b981; }
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* SIN Field Specific Styles */
#sin-number {
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
  background-color: #f9fafb;
}

#sin-number:focus {
  background-color: white;
}

#sin-help {
  color: #6b7280;
  font-style: italic;
}

/* SIN Validation Styles */
.sin-input.valid {
  border-color: #10b981 !important;
}

.sin-input.invalid {
  border-color: #ef4444 !important;
}

/* SIN Status Icon */
#sin-status-icon {
  transition: all 0.3s ease;
}

.sin-input.valid ~ #sin-status-icon span {
  color: #10b981;
  content: "✓" !important;
}

.sin-input.invalid:not(:focus):not(:placeholder-shown) ~ #sin-status-icon span {
  color: #ef4444;
  content: "✗" !important;
}

/* SIN Validation Messages */
#sin-error, #sin-success {
  animation: fadeIn 0.3s ease;
  margin-top: 5px;
  padding-left: 10px;
  border-left: 3px solid transparent;
}

#sin-error {
  color: #ef4444;
  border-left-color: #ef4444;
}

#sin-success {
  color: #10b981;
  border-left-color: #10b981;
}

/* Pulse animations for validation */
@keyframes pulse-valid {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-invalid {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

.sin-valid-pulse {
  animation: pulse-valid 1s ease;
}

.sin-invalid-pulse {
  animation: pulse-invalid 1s ease;
}

/* SIN Security Notice */
#sin-security-notice {
  background-color: #eff6ff;
  border-color: #dbeafe;
  margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #sin-number {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .grid-cols-1.md\:grid-cols-2 > div,
  .grid-cols-1.md\:grid-cols-3 > div {
    grid-column: span 1 / span 1;
  }
}

/* Form section headers */
.border-t {
  border-top-width: 1px;
}

/* Input focus styles for new fields */
input:focus, select:focus, textarea:focus {
  outline: none;
  ring-width: 2px;
  ring-color: #912026;
}

/* Required field indicators */
.required::after {
  content: " *";
  color: #ef4444;
}

/* Form section headers */
h5 {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* Grid spacing for new fields */
.grid > div {
  margin-bottom: 0.5rem;
}

/* Input validation styles */
input:valid, select:valid {
  border-color: #d1d5db;
}

input:invalid:not(:focus):not(:placeholder-shown),
select:invalid:not(:focus) {
  border-color: #ef4444;
}

/* Banking information section */
.border-t.pt-4 {
  margin-top: 1.5rem;
  padding-top: 1rem;
}

/* Animation for inline messages */
.animate-fadeIn {
  animation: fadeIn 0.3s ease;
}

/* Generate Test SIN button */
button[onclick*="generateTestSIN"] {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.25rem;
}