:root {
  --primary-color: #62e75f;
  --primary-hover: #45f882;
  --secondary-color: #198754;
  --success-color: #62e75f;
  --text-color: #ffffff;
  --light-text: #8b8f9a;
  --border-color: #19232a;
  --input-bg: #161e26;
  --step-active: #62e75f;
  --step-completed: #198754;
  --step-inactive: #595959;
  --error-color: #ef233c;
  --box-shadow: 0 4px 20px rgba(218, 213, 213, 0.01);
  --form-bg: #131a1e;
}

.broker-register-container {
  max-width: 800px;
  margin: 40px auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
}

.broker-register-form {
  background: var(--form-bg);
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.broker-register-form .form-header {
  background: var(--primary-color);
  color: #000000 !important;
  padding: 24px 32px;
  margin-bottom: 24px;
}

.broker-register-form .form-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: #000;
  word-spacing: 6px;
  letter-spacing: -0.5px;
}

.broker-register-form .form-header p {
  margin: 8px 0 0;
  opacity: 0.9;
  font-size: 15px;
  color: #020202;
  font-weight: 400;
}

.broker-register-form .form-progress {
  display: flex;
  justify-content: space-between;
  padding: 0 32px 12px;
  position: relative;
}

.broker-register-form .progress-steps {
  display: flex;
  width: 100%;
  justify-content: space-between;
  position: relative;
}

.broker-register-form .progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.broker-register-form .step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--step-inactive);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.broker-register-form .step-number.active {
  background: var(--step-active);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
  color: #000000;
}

.broker-register-form .step-number.completed {
  background: var(--step-completed);
}

.broker-register-form .step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--light-text);
  text-align: center;
  transition: all 0.3s ease;
}

.broker-register-form .step-label.active {
  color: var(--primary-color);
  font-weight: 600;
}

.broker-register-form .progress-line {
  position: absolute;
  top: 18px;
  left: 32px;
  right: 32px;
  height: 4px;
  background: var(--border-color);
  z-index: 1;
}

.broker-register-form .progress-completed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.4s ease;
}

.broker-register-form .broker-step {
  display: none;
  padding: 0 32px 24px;
  animation: fadeInStep 0.4s ease forwards;
}

.broker-register-form .broker-step.active {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.broker-register-form .section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 16px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 8px;
}

.broker-register-form .section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-hover);
  border-radius: 3px;
}

.broker-register-form .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

/* Improved ID section spacing */
.broker-register-form #broker_id_type + .form-row {
  margin-top: 20px;
}

.broker-register-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.broker-register-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-color);
}

.broker-register-form .required-field:after {
  content: '*';
  color: var(--error-color);
  margin-left: 4px;
}

.broker-register-form input,
.broker-register-form textarea,
.broker-register-form select {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--light-text);
  box-sizing: border-box;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  line-height: normal;
}

.broker-register-form input:focus,
.broker-register-form textarea:focus,
.broker-register-form select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(98, 231, 95, 0.2);
}

.broker-register-form input[type="date"] {
  appearance: none;
  position: relative;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8f9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'%3e%3c/path%3e%3cpolyline points='17 21 17 13 7 13 7 21'%3e%3c/polyline%3e%3cpolyline points='7 3 7 8 15 8'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
/* Date Input Styling */
.broker-register-form input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8f9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'%3e%3c/path%3e%3cpolyline points='17 21 17 13 7 13 7 21'%3e%3c/polyline%3e%3cpolyline points='7 3 7 8 15 8'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px; /* Make space for our icon */
}

/* Remove default dropdown arrow in Chrome/Safari */
.broker-register-form input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

/* Remove default dropdown arrow in Firefox */
.broker-register-form input[type="date"]::-moz-calendar-picker-indicator {
  display: none;
}

/* Remove default dropdown arrow in Edge */
.broker-register-form input[type="date"]::-ms-calendar-picker-indicator {
  display: none;
}

/* Date picker styling when opened */
.broker-register-form input[type="date"]:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2362e75f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'%3e%3c/path%3e%3cpolyline points='17 21 17 13 7 13 7 21'%3e%3c/polyline%3e%3cpolyline points='7 3 7 8 15 8'%3e%3c/polyline%3e%3c/svg%3e");
  background-color: var(--input-bg);
}

/* Date picker dropdown styling (affects the calendar popup) */
.broker-register-form input[type="date"]::-webkit-datetime-edit {
  color: var(--light-text);
}
.broker-register-form input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  background: var(--input-bg);
}
.broker-register-form input[type="date"]::-webkit-datetime-edit-text {
  color: var(--light-text);
  padding: 0 0.2em;
}
.broker-register-form input[type="date"]::-webkit-inner-spin-button {
  display: none;
}

/* File Input Styling */
.broker-register-form input[type="file"] {
  padding: 12px;
  background: #131a1e;
  border: 1px solid #19232a;
  color: #8b8f9a;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* File Input Hover State */
.broker-register-form input[type="file"]:hover {
  border-color: #62e75f;
}

/* File Input Focus State */
.broker-register-form input[type="file"]:focus {
  border-color: #62e75f;
  box-shadow: 0 0 0 3px rgba(98, 231, 95, 0.2);
}

/* File Input Button Styling */
.broker-register-form input[type="file"]::file-selector-button {
  background: #62e75f;
  color: #090d14;
  border: none;
  padding: 8px 16px;
  margin-right: 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.broker-register-form input[type="file"]::file-selector-button:hover {
  background: #45f882;
}

/* For Webkit browsers */
.broker-register-form input[type="file"]::-webkit-file-upload-button {
  background: #62e75f;
  color: #090d14;
  border: none;
  padding: 8px 16px;
  margin-right: 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.broker-register-form input[type="file"]::-webkit-file-upload-button:hover {
  background: #45f882;
}

.broker-register-form .file-upload-hint {
  font-size: 13px;
  color: var(--light-text);
  margin-top: 6px;
}

.broker-register-form .broker-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding: 0 32px 32px;
}

.broker-register-form .form-button {
  flex: 1;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
}

.broker-register-form .button-primary {
  background: var(--primary-color);
  color: #090d14;
}

.broker-register-form .button-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  color: #000;
}

.broker-register-form .button-secondary {
  background: var(--secondary-color);
  color: #ffffff;
  border: 1px solid var(--border-color);
}

.broker-register-form .button-secondary:hover {
  background: #1a9360;
  color: #fff;
}

.broker-register-form .button-primary:disabled,
.broker-register-form .button-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Success Screen */
.broker-register-form .broker-success-screen {
  display: none;
  text-align: center;
  padding: 60px 40px;
  background: var(--form-bg);
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.broker-register-form .broker-success-screen.active {
  display: block;
  animation: fadeInStep 0.6s ease forwards;
}

.broker-register-form .success-animation {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  position: relative;
}

.broker-register-form .success-animation-circle {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  stroke: var(--success-color);
  stroke-width: 6;
  stroke-linecap: round;
  fill: none;
  animation: drawCircle 0.6s ease forwards;
}

.broker-register-form .success-animation-check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  stroke: var(--success-color);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: drawCheck 0.4s 0.6s ease forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.broker-register-form .broker-success-screen h3 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 700;
}

.broker-register-form .broker-success-screen p {
  font-size: 16px;
  color: var(--light-text);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.broker-register-form .success-button {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary-color);
  color: #090d14;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.broker-register-form .success-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(98, 231, 95, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .broker-register-container {
    margin: 20px auto;
    padding: 0 16px;
  }
  
  .broker-register-form .form-header {
    padding: 20px 24px;
  }
  
  .broker-register-form .broker-step,
  .broker-register-form .broker-nav-buttons {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .broker-register-form .form-row {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .broker-register-form .form-header h2 {
    font-size: 20px;
  }
  
  .broker-register-form .form-header p {
    font-size: 14px;
  }
  
  .broker-register-form .step-label {
    display: none;
  }
  
  .broker-register-form .broker-success-screen {
    padding: 40px 24px;
  }
  
  .broker-register-form .broker-success-screen h3 {
    font-size: 24px;
  }
}