.agency-sign-up-page {
  display: block;
  height: auto;
  overflow-y: auto;
  background: #f5f7fa;
}

/* Trust Bar */
.trust-bar {
  background: #fff;
  padding: 24px 0;
  border-bottom: 1px solid #e1e5e9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.trust-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.trust-items {
  display: flex;
  gap: 32px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #333;
}

.trust-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Main Container */
.signup-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.page-heading {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.page-subheading {
  text-align: center;
  font-size: 1rem;
  color: #666;
  margin-bottom: 40px;
}

/* Grid Layout */
.signup-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}

/* Form Styles */
.signup-form {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.form-section {
  margin-bottom: 32px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f2f5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary-color);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a4a4a;
  margin-bottom: 6px;
}

.field-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-hint i {
  color: #94a3b8;
}

.form-group input,
.form-group select {
  padding: 12px 14px;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 125, 253, 0.1);
}

/* Phone Input */
.phone-input-container {
  display: flex;
  gap: 8px;
}

.phone-prefix-select {
  flex: 0 0 100px;
  min-width: 100px;
}

.phone-number-input {
  flex: 1;
  min-width: 0;
}

/* File Upload */
.file-upload-wrapper {
  position: relative;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafbfc;
  color: #6b7280;
}

.file-upload-label:hover {
  border-color: var(--primary-color);
  background: #f0f8ff;
  color: var(--primary-color);
}

.file-upload-label i {
  font-size: 1.5rem;
}

.logo-preview {
  margin-top: 12px;
  display: none;
}

.logo-preview img {
  max-width: 150px;
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.logo-preview.has-image {
  display: block;
}

/* Contract Section */
.contract-info {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.contract-info p {
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.6;
}

.contract-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}

.contract-status.unsigned {
  background: #fef3c7;
  color: #92400e;
}

.contract-status.unsigned i {
  color: #f59e0b;
}

.contract-status.signed {
  background: #d1fae5;
  color: #065f46;
}

.contract-status.signed i {
  color: #10b981;
}

.contract-actions {
  margin-bottom: 16px;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Summary Sidebar */
.signup-summary {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.box-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 24px;
  text-align: center;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.benefit-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.benefit-item:hover {
  background: #f0f8ff;
  transform: translateX(4px);
}

.benefit-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-item strong {
  display: block;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.benefit-item p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #0066cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 125, 253, 0.3);
}

.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-block {
  width: 100%;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.trust-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a1a2e;
}

.modal-header h2 i {
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #1a1a2e;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
}

/* Contract Loading/Error */
.contract-loading,
.contract-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.contract-loading i,
.contract-error i {
  font-size: 3rem;
  margin-bottom: 16px;
}

.contract-loading i {
  color: var(--primary-color);
}

.contract-error i {
  color: #f59e0b;
}

/* PDF Container */
.pdf-container {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  min-height: 400px;
  max-height: 50vh;
  overflow-y: auto;
}

.pdf-page {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  border-radius: 4px;
}

.pdf-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Signature Section */
.signature-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.signature-section h3 {
  font-size: 1.1rem;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.signature-section p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.signature-pad-wrapper {
  position: relative;
}

.signature-pad {
  width: 100%;
  height: 200px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad:hover {
  border-color: var(--primary-color);
}

#clear-signature-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Success Modal */
.success-modal-content {
  text-align: center;
  padding: 40px;
  max-width: 500px;
}

.success-icon {
  margin-bottom: 24px;
}

.success-icon i {
  font-size: 5rem;
  color: #10b981;
}

.success-modal-content h2 {
  color: #1a1a2e;
  margin-bottom: 16px;
}

.success-modal-content p {
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.6;
}

.success-modal-content .credentials-info {
  background: #dbeafe;
  color: #1e40af;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}

.success-modal-content .credentials-info i {
  font-size: 1.2rem;
}

.success-modal-content .btn {
  text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
  .signup-grid {
    grid-template-columns: 1fr;
  }

  .signup-summary {
    position: static;
    order: -1;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: 1;
  }
}

@media (max-width: 600px) {
  .trust-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .trust-items {
    flex-direction: column;
    gap: 12px;
  }

  .page-heading {
    font-size: 1.6rem;
  }

  .signup-container {
    padding: 0 16px;
    margin: 20px auto;
  }

  .signup-form,
  .signup-summary {
    padding: 20px;
  }

  .modal-content {
    margin: 10px;
    max-height: 95vh;
  }

  .phone-input-container {
    flex-direction: column;
  }

  .phone-prefix-select {
    flex: none;
  }
}

/* Contract document tabs */
.contract-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}

.contract-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
}

.contract-tab:hover {
  color: var(--primary-color);
}

.contract-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
