/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

#root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2d3748;
  text-align: center;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #2d3748;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
}

/* Container Styles */
.container {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  white-space: nowrap;
}

.tab-button {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s;
}

.tab-button:hover {
  color: #3b82f6;
}

.tab-button.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

/* Content Panels */
.content-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  min-height: 500px;
}

/* Form Panel */
.form-panel {
  background-color: #f8fafc;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-y: auto;
  height: 500px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: #4b5563;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="checkbox"] {
  margin-right: 0.5rem;
}

select {
  background-color: white;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  font-weight: normal;
  margin-bottom: 0;
}

.radio-group {
  margin-bottom: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.radio-label input {
  margin-right: 0.5rem;
}

/* Preview Panel */
.preview-panel {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-y: auto;
  height: 500px;
}

.preview-content {
  font-size: 0.875rem;
}

.document-preview {
  white-space: pre-wrap;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
}

.highlighted-text {
  background-color: #fff9c4;
  display: inline;
  padding: 2px 0;
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: #ffeb3b; }
  100% { background-color: #fff9c4; }
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.nav-button {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s;
}

.nav-button:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.nav-button.prev-button {
  background-color: white;
}

.nav-button.next-button {
  background-color: #4f46e5;
  border-color: #4f46e5;
  color: white;
}

.nav-button.next-button:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Risk Assessment */
.risk-assessment {
  margin-top: 1rem;
}

.risk-item {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: flex-start;
}

.risk-item.high {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
}

.risk-item.medium {
  background-color: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
}

.risk-item.low {
  background-color: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
}

.risk-icon {
  margin-right: 0.75rem;
  margin-top: 0.125rem;
}

.risk-content h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #1f2937;
}

.risk-content p {
  font-size: 0.8125rem;
  color: #4b5563;
}

/* Helper Classes */
.text-sm {
  font-size: 0.875rem;
}

.text-muted {
  color: #6b7280;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}
