:root {
  /* Use the same font family variable defined in FontFix.css */
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color: #213547;
  background-color: #ffffff;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}/* Global scrolling behavior */
html, body, #root {
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #646cff;
  --background-color: #f0f0f0;  /* Darker background */
  --text-color: #213547;
  --border-color: #c0c0c0;  /* Darker border */
  --error-color: #ff4d4f;
  --editor-bg-color: #ffffff;  /* Explicit white background for editor */
  --shadow-color: rgba(0, 0, 0, 0.1);  /* Shadow for the editor */
  --status-bar-height: 32px; /* Reduced from 40px to 32px (20% smaller) */
}

/* Style for root div */
#root {
  width: 100%;
  max-width: 100vw;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

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

html, body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  /* No longer specify font-family here as it's centralized in FontFix.css */
  color: var(--text-color);
  background-color: var(--background-color);
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important; /* Override the flex from index.css */
  place-items: initial !important; /* Override from index.css */
  min-width: 100% !important; /* Override from index.css */
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 1rem 1rem var(--status-bar-height) 1rem; /* Add bottom padding to account for fixed status bar */
  box-sizing: border-box;
  overflow: hidden; /* Prevent scrolling at the container level */
}

/* Fixed status bar at the bottom */
/* Status bar styles moved to StatusBar component */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  flex-shrink: 0;
  width: 80% !important; /* Default to 80% width */
  max-width: 1000px !important; /* But cap at 1000px maximum */
  align-self: center; /* Center horizontally */
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.save-status {
  font-size: 0.875rem;
  color: #888;
  min-height: 1.2em;
}

.save-error {
  color: var(--error-color);
  font-weight: 500;
}

.pending-changes {
  color: #ff9800; /* Orange warning color */
  font-weight: 500;
}

.offline-indicator {
  color: var(--error-color);
  font-weight: 500;
}

main {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center !important; /* Force center children horizontally */
  justify-content: flex-start;
  width: 100% !important;
  padding: 0.5rem;  /* Add padding to main */
  background-color: var(--background-color);  /* Explicitly set background */
  max-height: calc(100vh - 70px); /* Adjust for header height */
}

.editor-container {
  /* Make the container fill available space */
  display: flex;
  flex-direction: column;
  height: calc(100vh - 100px); /* Take up almost the full viewport height, minus header and some spacing */
  min-height: 500px; /* Minimum height for when content is small */
  width: 80% !important; /* Default to 80% width - important to override */
  max-width: 1000px !important; /* But cap at 1000px maximum */
  margin-bottom: 1rem; /* Reduce bottom margin */
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--editor-bg-color);
  box-shadow: 0 4px 12px var(--shadow-color);  /* Add shadow for depth */
  overflow: auto;  /* Enable scrolling */
  align-self: center; /* Ensure self-centering */
  position: relative; /* Ensure position context for absolute elements */
}

/* Remove fixed height on content */
.editor-content {
  padding: 1rem;
  min-height: 200px;
  background-color: var(--editor-bg-color);
  max-height: none !important; /* Override any max-height restrictions */
  overflow-y: visible !important; /* Allow content to flow */
  flex: 1 !important; /* Take up all available space */
  height: 100% !important;
}

/* Force the contenteditable to fill its parent */
[contenteditable="true"] {
  flex: 1 !important;
  min-height: 300px !important; /* Ensure minimum height even with little content */
  height: 100% !important;
}

/* Remove the extra space after main since we want the editor to fill the page */
main::after {
  display: none;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  font-size: 1.25rem;
  color: #888;
}

/* Bootstrap-style button classes */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
  cursor: pointer;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.btn-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.btn-primary:focus {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
  box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 0.5rem;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Login Form Styles */
.login-form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 1rem;
}

.login-form {
  width: 80%;
  max-width: 400px;
  padding: 2rem;
  background-color: var(--editor-bg-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
  margin: 0 auto; /* Center horizontally */
}

.login-form h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--primary-color);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--editor-bg-color);
  color: var(--text-color);
}

.error-message {
  background-color: #ffebee;
  color: var(--error-color);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.success-message {
  background-color: #e8f5e9;
  color: #4caf50;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.login-button {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.login-button:hover:not(:disabled) {
  background-color: #535bf2;
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Header actions and logout button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.action-button, .logout-button, .save-button {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.logout-button {
  background-color: var(--primary-color);
}

.action-button {
  background-color: #4CAF50; /* Green color for the reset button */
}

.save-button {
  background-color: #2196F3; /* Blue color for save button */
}

.action-button:hover, .logout-button:hover, .save-button:hover {
  opacity: 0.9;
  filter: brightness(1.1);
}

.action-button:disabled, .logout-button:disabled, .save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Email verification styles */
.email-verification-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: white;
  text-align: center;
}

.verification-message {
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.verification-message.loading {
  background-color: #f8f9fa;
  color: #495057;
}

.verification-message.success {
  background-color: #d4edda;
  color: #155724;
}

.verification-message.error {
  background-color: #f8d7da;
  color: #721c24;
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #007bff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Auth tabs styling */
.auth-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 400px;
}

.auth-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.auth-tab.active {
  border-bottom: 2px solid var(--primary-color);
  opacity: 1;
  font-weight: 500;
}

.auth-footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.text-button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}

/* Verification resend button styling */
.verification-actions {
  margin-top: 1rem;
  text-align: center;
}

.verification-button {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.verification-button:hover:not(:disabled) {
  background-color: rgba(100, 108, 255, 0.1);
}

.verification-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}/* Font standardization across the application */

:root {
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;
}

html, body, #root {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, textarea, select, button {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

.editor-content {
  font-family: var(--font-family) !important;
}

/* Fix for any content editable divs */
[contenteditable="true"] {
  font-family: var(--font-family) !important;
}

/* Fix for the structured editor forms */
.form-group input, 
.form-group textarea, 
.form-group select,
.risk-assessment-editor,
.risk-analysis-form,
.remedial-measure-form {
  font-family: var(--font-family) !important;
}

/* Ensure buttons have consistent fonts */
.add-button, 
.remove-button, 
.action-button, 
.logout-button, 
.save-button,
.login-button,
.auth-tab,
.text-button,
.verification-button {
  font-family: var(--font-family) !important;
}.create-risk-assessment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.create-risk-assessment-modal {
  background: white;
  border-radius: 8px;
  padding: 32px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.create-risk-assessment-modal h2 {
  margin: 0 0 24px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.form-group input:disabled,
.form-group textarea:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.cancel-button,
.submit-button,
.secondary-button,
.upload-button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cancel-button {
  background-color: #f0f0f0;
  color: #333;
}

.cancel-button:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.secondary-button {
  background-color: #fff;
  color: #0066cc;
  border: 1px solid #0066cc;
}

.secondary-button:hover:not(:disabled) {
  background-color: #f0f7ff;
}

.submit-button {
  background-color: #0066cc;
  color: white;
}

.submit-button:hover:not(:disabled) {
  background-color: #0052a3;
}

.upload-button {
  background-color: #17a2b8;
  color: white;
}

.upload-button:hover:not(:disabled) {
  background-color: #138496;
}

.cancel-button:disabled,
.submit-button:disabled,
.secondary-button:disabled,
.upload-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.optional-label {
  font-weight: normal;
  color: #888;
  font-size: 12px;
  margin-left: 4px;
}

.form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}.risk-generation-progress {
  padding: 32px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-icon {
  font-size: 32px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.status-info h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.cancel-button {
  padding: 10px 20px;
  border: 1px solid #dc3545;
  background-color: white;
  color: #dc3545;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-button:hover {
  background-color: #dc3545;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.progress-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.progress-bar-container {
  position: relative;
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 24px;
  background-color: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  transition: width 0.5s ease-out;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-percentage {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.progress-message {
  margin: 0;
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  border: 1px solid #e9ecef;
}

.job-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background-color: #fafafa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-label {
  font-weight: 500;
  color: #666;
  min-width: 80px;
}

.detail-value {
  font-weight: 600;
  color: #333;
}

.error-details {
  margin-top: 8px;
  padding: 16px;
  background-color: #fee;
  border-radius: 6px;
  border: 1px solid #fcc;
}

.error-text {
  color: #c33;
  font-size: 14px;
  line-height: 1.5;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .risk-generation-progress {
    padding: 20px;
    min-height: 350px;
  }

  .status-info h3 {
    font-size: 20px;
  }

  .progress-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cancel-button {
    align-self: flex-end;
  }

  .detail-label {
    min-width: 60px;
    font-size: 14px;
  }
}.risk-generation-results {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.results-header {
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 16px;
}

.results-header h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.results-summary {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #666;
}

.summary-item strong {
  color: #333;
  font-weight: 600;
}

.results-options {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.options-description {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.risks-preview {
  flex: 1;
  overflow-y: auto;
}

.risks-preview h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.no-risks {
  text-align: center;
  padding: 48px 24px;
  color: #666;
  font-style: italic;
}

.risks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.risk-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.risk-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.risk-header {
  display: flex;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

.risk-header:hover {
  background-color: #f0f0f0;
}

.expand-icon {
  font-size: 12px;
  color: #666;
  margin-right: 12px;
  transition: transform 0.2s ease;
}

.risk-header h5 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.ai-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-details {
  padding: 20px;
  animation: slideDown 0.3s ease-out;
}

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

.detail-section {
  margin-bottom: 20px;
}

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

.detail-section h6 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.detail-section ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.detail-section li {
  margin-bottom: 4px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.risk-scoring {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.risk-scoring span {
  background-color: #f0f0f0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
}

.risk-rating {
  background-color: #ffeaa7 !important;
  color: #333 !important;
  font-weight: 600;
}

.results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.primary-button,
.secondary-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-button {
  background-color: #10b981;
  color: white;
}

.primary-button:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.secondary-button {
  background-color: #f5f5f5;
  color: #333;
}

.secondary-button:hover {
  background-color: #e0e0e0;
  transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .risk-generation-results {
    padding: 20px;
  }

  .results-summary {
    flex-direction: column;
    gap: 8px;
  }

  .results-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .risk-header {
    padding: 12px;
  }

  .risk-header h5 {
    font-size: 14px;
  }

  .ai-badge {
    font-size: 10px;
    padding: 3px 6px;
  }
}.risk-generation-flow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.risk-generation-flow-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

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

.error-container {
  padding: 48px;
  text-align: center;
}

.error-container h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  font-weight: 600;
  color: #d32f2f;
}

.error-container p {
  margin: 0 0 32px 0;
  color: #666;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.cancel-button,
.retry-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-button {
  background-color: #f5f5f5;
  color: #333;
}

.cancel-button:hover {
  background-color: #e0e0e0;
}

.retry-button {
  background-color: #1976d2;
  color: white;
}

.retry-button:hover {
  background-color: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}.app-header {
  width: 100%;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.app-header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.back-button {
  background-color: #f0f0f0;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: #e0e0e0;
}

.export-button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  margin-right: 10px;
}

.export-button:hover {
  background-color: #218838;
}

/* Dropdown used for export options */
.export-select {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  margin-right: 10px;
}

.export-select:hover {
  background-color: #218838;
}

.export-select option {
  color: #000;
}

.logout-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: #c82333;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .app-header-container {
    width: 95%;
  }
  
  .app-title {
    font-size: 1.2rem;
  }
  
  .app-header-left {
    gap: 10px;
  }
  
  .back-button,
  .logout-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}.documents-page {
  background-color: #f5f5f5;
  min-height: 100vh;
}

.documents-header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.documents-header h1 {
  margin: 0;
  font-size: 2rem;
  color: #333;
}

.logout-button {
  padding: 0.5rem 1.5rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: #5a6268;
}

.documents-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.documents-actions {
  margin-bottom: 2rem;
}

.create-button {
  padding: 0.75rem 1.5rem;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.create-button:hover {
  background-color: #218838;
}

.upload-button {
  padding: 0.75rem 1.5rem;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
  margin-left: 0.5rem;
}

.upload-button:hover:not(:disabled) {
  background-color: #138496;
}

.upload-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  font-size: 1.2rem;
  color: #666;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.empty-state p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.document-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.document-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.document-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.document-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  cursor: pointer;
  flex: 1;
  margin-right: 0.5rem;
}

.document-card h3:hover {
  color: #007bff;
  text-decoration: underline;
}

.delete-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.delete-button:hover {
  opacity: 1;
}

.document-meta {
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.document-meta p {
  margin: 0.25rem 0;
}

.open-button {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.open-button:hover {
  background-color: #0056b3;
}/* Document-Style Risk Assessment Styles */

/* ===== General Document Styling ===== */
.document-style-editor {
  width: 100%;
  font-family: var(--font-family);
  background-color: white;
}

.document-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.document-header h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: bold;
}

.document-section {
  margin-bottom: 2rem;
  page-break-inside: avoid;
}

.section-header {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #555;
}

/* ===== Risk Analysis Header ===== */
.risk-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.risk-analysis-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0;
}

/* ===== Delete Button ===== */
.delete-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.delete-button:hover {
  background-color: #c82333;
}

.delete-button:active {
  background-color: #bd2130;
}

/* ===== New Form Styling ===== */
.yellow-background {
  background-color: #ffeeba !important;
}

.yellow-note {
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  color: #856404;
}

.gray-background {
  background-color: #d3d3d3 !important;
}

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

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

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

.form-column-left {
  flex: 3;
}

.form-column-right {
  flex: 2;
}

.description-textarea {
  min-height: 295px;
}

.placeholder-input::placeholder {
  color: #007bff;
  opacity: 1;
}

.participants-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.participants-table th,
.participants-table td {
  border: 1px solid #000;
  padding: 12px;
  vertical-align: top;
  height: 120px;
}

.participants-table th {
  background-color: #ffffff;
  font-weight: bold;
  text-align: center;
}

.gray-row {
  background-color: #e6e6e6;
}

.white-row {
  background-color: #ffffff;
}

.table-input {
  width: 100%;
  border: none;
  background-color: transparent;
  padding: 0.25rem;
  outline: none;
}

.add-participant-button {
  margin-top: 0.5rem;
}

.key-participants-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  margin-top: 0;
}

.participant-field.grow-wrap {
  min-height: 24px;
  margin: 0;
  padding: 0;
  height: 100%;
}

.participant-field.grow-wrap > textarea,
.participant-field.grow-wrap::after {
  min-height: 80px;
  line-height: 1.2;
  padding: 8px;
  background-color: transparent;
  border: none;
  width: 100%;
  margin: 0;
  height: 100%;
  resize: none;
}

/* ===== Table Styling ===== */
.document-table,
.risk-assessment-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-family: var(--font-family);
}

.document-table th,
.document-table td,
.risk-assessment-table th,
.risk-assessment-table td {
  border: 1px solid #000;
  padding: 0.75rem;
  vertical-align: top;
}

.document-table th,
.risk-assessment-table th {
  background-color: #fff;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
  white-space: normal;
  padding: 0.75rem 0.5rem;
}

.document-meta-table {
  width: 100%;
  border-collapse: collapse;
}

.document-meta-table td {
  border: none;
  padding: 0.5rem;
}

.header-label {
  font-weight: bold;
  width: 25%;
}

.header-value {
  width: 25%;
}

.label-cell {
  width: 30%;
  background-color: #f8f8f8;
  font-weight: 500;
}

.value-cell {
  width: 70%;
}

/* ===== Risk Analysis Table Specifics ===== */
.risk-analysis-container,
.evaluation-container {
  margin-bottom: 2rem;
}

.risk-analysis-separator,
.evaluation-separator {
  height: 2px;
  background-color: #555;
  margin: 2rem 0;
}

.risk-assessment-table .section-header {
  background-color: #fff;
  font-weight: bold;
  border-bottom: none;
  text-align: left;
  font-size: 1.2rem;
  padding-left: 0;
}

.risk-analysis-title {
  font-size: 1.2rem;
  font-weight: normal;
  margin: 1rem 0 0.5rem 0;
  padding: 0;
  border-bottom: none;
}

.risk-assessment-table {
  margin-bottom: 0;
  border-collapse: collapse;
}

.table-header {
  font-weight: bold;
  text-align: center;
  background-color: #ffffff;
  padding: 0.5rem;
}

.risk-assessment-table .data-row td {
  background-color: #d3d3d3;
  height: 70px;
  vertical-align: top;
  padding: 0;
  position: relative;
}

.risk-assessment-table .remedial-row td {
  height: 110px;
}

.risk-textarea {
  width: 100%;
  height: auto;
  min-height: 50px;
  background-color: #d3d3d3;
  border: none;
  resize: none;
  padding: 0.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.5;
  box-sizing: border-box;
  outline: none;
  overflow: hidden;
}

.risk-text-input {
  width: 100%;
  background-color: #d3d3d3;
  border: none;
  padding: 0.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
}

.label-cell {
  padding: 0.5rem;
  vertical-align: middle;
  background-color: #ffffff;
}

.rate-label {
  text-align: center;
}

.rate-description {
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
}

.remedial-measures-table {
  margin-top: 0 !important;
  border-top: none;
}

.remedial-measures-table td {
  border-top: none;
}

.actions-table {
  margin-top: 0 !important;
}

.risk-table-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.rating-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  position: relative;
}

.risk-number-input {
  font-size: 1.2rem;
  font-weight: bold;
  width: 4rem !important;
  text-align: center;
}

.rate-description {
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
}

.status-cell {
  text-align: center;
}

/* ===== Auto-growing Textarea ===== */
.grow-wrap {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 50px;
}

.grow-wrap::after {
  content: attr(data-replicated-value) " ";
  white-space: pre-wrap;
  visibility: hidden;
}

.grow-wrap > textarea {
  resize: none;
  overflow: hidden;
}

.grow-wrap > textarea,
.grow-wrap::after {
  font: inherit;
  grid-area: 1 / 1 / 2 / 2;
  border: none;
  background-color: #d3d3d3;
  padding: 0.5rem;
  line-height: 1.5;
  width: 100%;
  min-height: 50px;
  font-family: var(--font-family);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
}

.gray-background.grow-wrap > textarea,
.gray-background.grow-wrap::after {
  background-color: #d3d3d3;
}

.description-textarea.grow-wrap > textarea,
.description-textarea.grow-wrap::after {
  min-height: 295px;
}

/* ===== Form Input Styling ===== */
.document-input,
.document-textarea,
.document-textarea-small {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-family);
  background-color: #d3d3d3;
  outline: none;
}

.date-input {
  cursor: pointer;
  position: relative;
}

.document-textarea {
  min-height: 100px;
  height: auto;
  resize: none;
  overflow: hidden;
}

.document-textarea-small {
  min-height: 60px;
  height: auto;
  resize: none;
  overflow: hidden;
}

.table-form-inputs input,
.table-form-inputs textarea,
.table-form-inputs select {
  border: none;
  background-color: #d3d3d3;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  font-family: var(--font-family);
  outline: none;
}

.table-form-inputs textarea {
  min-height: 100px;
  resize: none;
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #000;
  border: none;
  background-color: #d3d3d3;
  overflow: hidden;
}

/* ===== Risk Rating Display ===== */
.rating-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.5rem;
}

.risk-number-input {
  width: 50px !important;
  height: 35px !important;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0;
  border: 1px solid #ccc !important;
  background-color: #fff !important;
}

.risk-rating {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}

.risk-level {
  margin-top: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  display: inline-block;
}

.risk-level-tolerable {
  background-color: #d4edda;
  color: #155724;
}

.risk-level-tolerable-with-approval {
  background-color: #fff3cd;
  color: #856404;
}

.risk-level-unacceptable {
  background-color: #dc3545;
  color: white;
}

/* ===== Synopsis Section ===== */
.synopsis {
  margin-top: 1rem;
}

.synopsis-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.synopsis-content {
  background-color: #d3d3d3;
  min-height: 100px;
  padding: 0;
  border: 1px solid #000;
}

.synopsis-content .grow-wrap {
  min-height: 100px;
}

.synopsis-content .grow-wrap > textarea,
.synopsis-content .grow-wrap::after {
  min-height: 100px;
}

/* ===== Action Buttons ===== */
.add-button, 
.remove-button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 1rem 0;
}

.add-button {
  background-color: #4caf50;
  color: white;
  border: none;
  display: block;
}

.remove-button {
  background-color: #f44336;
  color: white;
  border: none;
  margin-left: auto;
  display: block;
}

.add-button:hover, 
.remove-button:hover {
  opacity: 0.9;
}

/* ===== Status and Misc Elements ===== */
.status-incomplete {
  font-weight: bold;
  color: #f44336;
}

.superscript {
  vertical-align: super;
  font-size: smaller;
}

.next-page-indicator {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
}

.next-page-indicator::after {
  content: "→";
  font-size: 1.5rem;
  margin-left: 0.5rem;
}

/* ===== Print Optimization ===== */

@media print {
  .document-style-editor {
    box-shadow: none;
    padding: 0;
  }
  
  .risk-assessment-table,
  .document-table {
    page-break-inside: avoid;
  }
  
  .add-button, 
  .remove-button {
    display: none;
  }
}

/* ===== AI Suggestion Styles ===== */
.ai-suggestion-box {
  background: #e3f2fd;
  border: 2px solid #64b5f6;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
  position: relative;
}

.ai-suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ai-badge {
  background: #1976d2;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-badge::before {
  content: "💡";
  font-size: 14px;
}

.ai-suggestion-content {
  color: #1565c0;
  margin: 8px 0;
  font-style: normal;
  background: white;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #90caf9;
}

.ai-suggestion-rationale {
  font-size: 12px;
  color: #0d47a1;
  font-style: italic;
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.ai-suggestion-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.ai-accept-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-accept-btn:hover {
  background: #45a049;
}

.ai-reject-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-reject-btn:hover {
  background: #d32f2f;
}

/* AI-assisted field indicator */
.ai-assisted-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #1976d2;
  background: rgba(227, 242, 253, 0.9);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(100, 181, 246, 0.5);
  z-index: 1;
}

.ai-assisted-indicator::before {
  content: "💡";
  font-size: 10px;
}

/* Header AI indicator */
.header-ai-indicator {
  background: #1976d2;
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

/* Field container with suggestion */
.field-with-suggestion {
  position: relative;
}

/* Field container inside table cells should fill the cell */
.risk-assessment-table td .field-with-suggestion {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Ensure grow-wrap works inside field-with-suggestion */
.field-with-suggestion .grow-wrap {
  display: grid;
  width: 100%;
  position: relative;
  flex: 1;
}

.field-with-suggestion .grow-wrap::after {
  content: attr(data-replicated-value) " ";
  white-space: pre-wrap;
  visibility: hidden;
}

.field-with-suggestion .grow-wrap > textarea,
.field-with-suggestion .grow-wrap::after {
  font: inherit;
  grid-area: 1 / 1 / 2 / 2;
}

/* Position AI badge inside grow-wrap */
.grow-wrap .ai-assisted-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
}

.field-with-suggestion textarea.ai-assisted {
  /* Keep the same gray background as normal fields */
  background-color: #d3d3d3;
  border: none;
}

.field-with-suggestion input.ai-assisted {
  /* Keep the same gray background as normal fields */
  background-color: #d3d3d3;
  border: 1px solid #ddd;
}

/* Special styling for remedial measures with AI suggestions */
.remedial-textarea .grow-wrap,
.remedial-textarea .grow-wrap > textarea,
.remedial-textarea .grow-wrap::after {
  min-height: 110px !important;
}

/* Special styling for synopsis with AI suggestions */
.synopsis-textarea .grow-wrap,
.synopsis-textarea .grow-wrap > textarea,
.synopsis-textarea .grow-wrap::after {
  min-height: 100px !important;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .document-style-editor {
    padding: 1rem;
  }
  
  .document-meta-table td {
    display: block;
    width: 100%;
  }
  
  .header-label,
  .header-value {
    width: 100%;
  }
}

/* ===== Risk Generation Styles ===== */
.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.generate-risks-button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.generate-risks-button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.generate-risks-button:active {
  transform: translateY(0);
}

/* ===== Modal Styles ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* Add section header container for button alignment */
.section-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #555;
}

.section-header-container .section-header {
  margin: 0;
  padding: 0;
  border: none;
}

.section-actions {
  display: flex;
  gap: 12px;
}

/* Documents Consulted Section */
.documents-consulted-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}

.document-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.document-item .document-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.document-item .remove-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #dc3545;
  background-color: #fff;
  color: #dc3545;
  border-radius: 4px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.document-item .remove-button:hover {
  background-color: #dc3545;
  color: #fff;
}

/* ===== AI Estimate Eye Icon and Popup ===== */

.ai-estimate-eye {
  position: absolute;
  top: 2px;
  right: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
  color: #0066cc;
  z-index: 10;
}

.ai-estimate-eye:hover {
  color: #004499;
}

.ai-estimate-popup {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 120px;
  font-size: 12px;
}

.ai-estimate-popup-title {
  font-weight: bold;
  margin-bottom: 4px;
}
.risk-generation-panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1f2937;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  transition: color 0.2s;
}

.close-button:hover {
  color: #1f2937;
}

.generation-setup {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.required {
  color: #ef4444;
  margin-left: 4px;
}

.project-description-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

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

.generation-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.generation-options h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #1f2937;
}

.checkbox-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkbox-label:hover {
  background: #f3f4f6;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
}

.checkbox-label > span:first-of-type {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #374151;
}

.option-description {
  font-size: 13px;
  color: #6b7280;
  margin-left: 24px;
}

.error-message {
  padding: 12px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  color: #dc2626;
  font-size: 14px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.primary-button,
.secondary-button {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.primary-button {
  background: #3b82f6;
  color: white;
}

.primary-button:hover:not(:disabled) {
  background: #2563eb;
}

.primary-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.secondary-button {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.secondary-button:hover {
  background: #f9fafb;
}

.error-container {
  padding: 40px 20px;
  text-align: center;
}

.error-container .error-message {
  color: #ef4444;
  font-size: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
}

.error-container .action-buttons {
  justify-content: center;
}.tagged-field {
  width: 100%;
}

.websocket-warning {
  background-color: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f59e0b;
}

.tags-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: 60px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.tag {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  animation: tagAppear 0.2s ease-out;
  position: relative;
  transition: all 0.2s ease;
}

@keyframes tagAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tag-ai {
  background-color: #f0f9ff;
  border-left: 3px solid #0284c7;
  color: #0c4a6e;
}

.tag-human {
  background-color: #f7fee7;
  border-left: 3px solid #16a34a;
  color: #14532d;
}

.tag:hover {
  background-color: #fafafa;
}

.tag-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tag-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tag-text {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  cursor: pointer;
  user-select: none;
}

.tag-text:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
}

.tag-metadata {
  font-size: 11px;
  color: #6b7280;
  opacity: 0.7;
}

.tag-remove {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.tag-remove:hover {
  opacity: 1;
  color: #dc2626;
}

/* Editing state */
.tag.editing {
  padding: 8px;
}

.tag.editing .tag-icon {
  align-self: flex-start;
}

.tag-input-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}

.tag-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  background: transparent;
  resize: vertical;
  min-height: 24px;
}

.tag-input::placeholder {
  color: #9ca3af;
}

.tag-edit-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 24px;
}

/* Error state */
.tagged-field.error .tags-container {
  border-color: #ef4444;
}

/* Disabled state */
.tagged-field.disabled .tags-container {
  background-color: #f9fafb;
  cursor: not-allowed;
}

.tagged-field.disabled .tag-input,
.tagged-field.disabled .tag-remove {
  pointer-events: none;
  opacity: 0.5;
}

/* Focus state */
.tags-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Auto-resize textareas */
.tag-input:focus,
.tag-edit-input:focus {
  outline: none;
}

/* Separator between items */
.tag:not(:first-child) {
  border-top: 1px solid #e5e7eb;
}

/* Compact mode for table cells */
.tagged-field.compact .tags-container {
  min-height: 40px;
  padding: 6px;
  gap: 4px;
}

.tagged-field.compact .tag {
  padding: 6px 8px;
  font-size: 13px;
}

.tagged-field.compact .tag-input-container {
  padding: 6px 8px;
}

/* Status indicator */
.tag-pending {
  opacity: 0.7;
  border-style: dashed;
}

.tag-pending::after {
  content: '...';
  margin-left: 2px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Context tooltip styles */
.tag-context-tooltip {
  position: absolute;
  top: 8px;
  right: 40px; /* Position to the left of the remove button */
  z-index: 10;
}

.context-icon {
  display: inline-block;
  font-size: 12px;
  color: #6b7280;
  cursor: help;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.context-icon:hover {
  opacity: 1;
  color: #374151;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}/* Meeting Modal Styles */
.meeting-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.meeting-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.meeting-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meeting-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #111827;
}

.meeting-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.meeting-modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.meeting-modal-form {
  padding: 1.5rem;
}

.meeting-modal-field {
  margin-bottom: 1.5rem;
}

.meeting-modal-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.meeting-modal-field input,
.meeting-modal-field select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.meeting-modal-select {
  background-color: white;
  cursor: pointer;
}

.meeting-modal-field small {
  display: block;
  margin-top: 0.25rem;
  color: #6b7280;
  font-size: 0.75rem;
}

.meeting-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
}

.meeting-modal-cancel,
.meeting-modal-submit {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.meeting-modal-cancel {
  background-color: #f3f4f6;
  color: #374151;
}

.meeting-modal-cancel:hover:not(:disabled) {
  background-color: #e5e7eb;
}

.meeting-modal-submit {
  background-color: #3b82f6;
  color: white;
}

.meeting-modal-submit:hover:not(:disabled) {
  background-color: #2563eb;
}

.meeting-modal-cancel:disabled,
.meeting-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}/* Meeting Integration Section Styles */
.meeting-integration-section {
  margin-left: 10px;
  margin-right: 10px;
}

.meeting-loading {
  text-align: center;
  color: #6b7280;
  padding: 1rem;
  font-size: 0.875rem;
}

.meeting-join-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
}

.meeting-join-button:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.meeting-error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Speaker Status Indicators */
.speaker-status-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.speaking-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #bbdefb;
  animation: pulse 2s infinite;
}

.speaking-dot {
  width: 8px;
  height: 8px;
  background: #f44336;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(25, 118, 210, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0.3;
  }
}

/* Responsive design for speaker indicators */
@media (max-width: 768px) {
  .speaker-status-indicators {
    gap: 6px;
    margin-left: 8px;
  }
  
  .speaking-indicator {
    padding: 3px 6px;
    font-size: 11px;
  }
}/* Toast Notification Styles */

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 300px;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s ease-out;
  transition: all 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-removing {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Toast type variations */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

/* Toast icon */
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
}

.toast-success .toast-icon {
  background-color: #d1fae5;
  color: #059669;
}

.toast-error .toast-icon {
  background-color: #fee2e2;
  color: #dc2626;
}

.toast-warning .toast-icon {
  background-color: #fef3c7;
  color: #d97706;
}

.toast-info .toast-icon {
  background-color: #dbeafe;
  color: #2563eb;
}

/* Toast content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.toast-message {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Toast action button */
.toast-action {
  margin-top: 8px;
  padding: 6px 12px;
  background-color: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.toast-action:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.toast-success .toast-action {
  color: #059669;
  border-color: #10b981;
}

.toast-success .toast-action:hover {
  background-color: #d1fae5;
}

.toast-error .toast-action {
  color: #dc2626;
  border-color: #ef4444;
}

.toast-error .toast-action:hover {
  background-color: #fee2e2;
}

/* Toast close button */
.toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.toast-close:hover {
  background-color: #f3f4f6;
  color: #6b7280;
}/* Toast Container Styles */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}

/* Responsive positioning */
@media (max-width: 640px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    max-width: 100%;
  }
}.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6c757d;
  z-index: 1000;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.status-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-message {
  color: #dc3545;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.error-message::before {
  content: "⚠️";
  font-size: 12px;
}

.saved-message {
  color: #28a745;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.saved-message::before {
  content: "💾";
  font-size: 12px;
}

.document-title {
  font-weight: 600;
  color: #333;
  padding-right: 16px;
  border-right: 1px solid #dee2e6;
}

/* Meeting status styles */
.meeting-status-icon {
  font-size: 0.75rem;
  animation: meetingPulse 2s infinite;
}

@keyframes meetingPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.meeting-status-text {
  font-weight: 500;
}

.meeting-status-separator {
  color: #6b7280;
}

.meeting-bot-name {
  color: #9ca3af;
}

.meeting-status-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meeting-status-transcript-btn,
.meeting-status-stop-btn {
  background: none;
  border: 1px solid #374151;
  color: #6c757d;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.meeting-status-transcript-btn {
  padding: 0.375rem 0.5rem;
}

.meeting-status-transcript-btn:hover {
  background-color: #374151;
  border-color: #4b5563;
  color: white;
}

.meeting-status-stop-btn {
  background-color: #dc2626;
  border-color: #dc2626;
  color: white;
}

.meeting-status-stop-btn:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}



/* Adjust main content to account for status bar */
.app-container.meeting-active {
  padding-bottom: 60px;
}

/* Responsive design */
@media (max-width: 768px) {
  .status-bar {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .status-bar-left {
    gap: 12px;
  }
  
  .status-bar-right {
    gap: 8px;
  }
  

}

/* Mobile responsiveness for meeting status */
@media (max-width: 640px) {
  .meeting-status-info {
    font-size: 0.75rem;
    gap: 0.5rem;
  }
  
  .meeting-bot-name {
    display: none;
  }
  
  .meeting-status-separator {
    display: none;
  }
}

/* Status bar button styling */
.status-bar-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar-button:hover {
  background-color: #0056b3;
} .update-records-display {
  position: relative;
  display: inline-block;
}

.update-records-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.update-records-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.update-records-button.ai-update {
  color: #4a90e2; /* Light blue for AI updates */
}

.update-records-button.human-update {
  color: #28a745; /* Green for human updates */
}

.update-count {
  font-weight: 600;
}

.pencil-icon {
  opacity: 0.8;
}

.update-records-popup {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 320px;
  max-width: 450px;
  max-height: 400px;
  overflow: hidden;
  z-index: 1001; /* Higher than status bar */
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.popup-header h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.close-button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.close-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.popup-content {
  max-height: 250px;
  overflow-y: auto;
}

.update-record {
  padding: 6px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.update-record:last-child {
  border-bottom: none;
}

.update-record:hover {
  background-color: #f8f9fa;
}

.update-record.ai {
  background-color: rgba(74, 144, 226, 0.1); /* Light blue background for AI */
  border-left: 3px solid #4a90e2;
}

.update-record.human {
  background-color: rgba(40, 167, 69, 0.1); /* Light green background for human */
  border-left: 3px solid #28a745;
}

.update-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  gap: 8px;
}

.action-type {
  font-weight: 600;
  font-size: 10px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-record.ai .action-type {
  color: #4a90e2;
}

.update-record.human .action-type {
  color: #28a745;
}

.update-path {
  font-size: 10px;
  color: #666;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-time {
  font-size: 9px;
  color: #999;
  white-space: nowrap;
  min-width: 45px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* Scrollbar styling for popup content */
.popup-content::-webkit-scrollbar {
  width: 6px;
}

.popup-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.popup-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.undo-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  transition: all 0.2s ease;
}

.undo-button:hover:not(:disabled) {
  background-color: #f0f0f0;
  border-color: #b0b0b0;
}

.undo-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f5f5f5;
  color: #999;
}

.undo-icon {
  opacity: 0.8;
}

/* Responsive positioning for smaller screens */
@media (max-width: 768px) {
  .update-records-popup {
    min-width: 280px;
    max-width: 350px;
  }
}

@media (max-width: 480px) {
  .update-records-popup {
    min-width: 250px;
    max-width: 300px;
    max-height: 300px;
  }
} .risk-list-sidebar {
  width: 300px;
  height: 100%;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  flex-shrink: 0;
}

.risk-list-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.risk-list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.risk-list-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0;
}

.risk-list-item {
  padding: 12px 20px;
  cursor: pointer;
  background: white;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
  position: relative;
}

.risk-list-item:hover {
  background: #f3f4f6;
}

.risk-list-item.active {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding-left: 17px;
}

.risk-list-item.bot-selected {
  animation: pulse 2s ease-out;
}

@keyframes pulse {
  0% {
    background: #eff6ff;
  }
  50% {
    background: #dbeafe;
  }
  100% {
    background: #eff6ff;
  }
}

.overview-item .risk-item-icon {
  margin-right: 8px;
  font-size: 16px;
}

.risk-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.risk-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.risk-item-title {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-indicator {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
}

.empty-state p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.empty-state-hint {
  font-size: 12px;
  color: #9ca3af;
}

/* Add Risk button */
.add-risk-button-container {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}

.add-risk-button {
  width: 100%;
  padding: 10px 16px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.add-risk-button:hover {
  background-color: #2563eb;
}

.add-risk-button:active {
  background-color: #1d4ed8;
}

/* Accessibility - Focus indicators */
.risk-list-item:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}/* Risk Resolution Matrix Drawer Styles */

/* Drawer Handle */
.drawer-handle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #2c3e50;
  color: white;
  padding: 12px 8px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 80px;
  justify-content: center;
}

.drawer-handle.open {
  right: 800px;
}

.drawer-handle:hover {
  background: #34495e;
  transform: translateY(-50%) translateX(-2px);
}

.drawer-handle.open {
  background: #e74c3c;
}

.drawer-handle.open:hover {
  background: #c0392b;
}

.handle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.handle-text {
  font-size: 11px;
  font-weight: 500;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  transform: rotate(180deg);
}

/* Drawer Container */
.risk-matrix-drawer {
  position: fixed;
  right: -800px;
  top: 0;
  width: 800px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.risk-matrix-drawer.open {
  right: 0;
}

/* Drawer Header */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: #e9ecef;
  color: #333;
}

/* Drawer Content */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.drawer-content h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-weight: 600;
  font-size: 1.2rem;
}

.drawer-content > div {
  margin-bottom: 32px;
}

/* Collapsible Sections */
.collapsible-section {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #dee2e6;
  min-height: 80px;
}

.section-header:hover {
  background: #e9ecef;
}

.section-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: #666;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.section-content.expanded {
  max-height: 1000px; /* Large enough to accommodate content */
  padding: 20px;
}

/* Tables */
.severity-table,
.probability-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}

.severity-table th,
.severity-table td,
.probability-table th,
.probability-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.severity-table th,
.probability-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.severity-table td:first-child,
.probability-table td:first-child {
  font-weight: 600;
  background: #f8f9fa;
  width: 120px;
}

/* Risk Matrix */
.matrix-section {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 20px;
  background: #f8f9fa;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.legend-color.unacceptable {
  background: #e53935;
}

.legend-color.tolerable-sma {
  background: #fff176;
}

.legend-color.tolerable {
  background: #81c784;
}

.risk-matrix-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.matrix-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.frequency-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-weight: 600;
  font-size: 12px;
  color: #333;
  letter-spacing: 1px;
}

.risk-matrix-table {
  border-collapse: collapse;
  font-size: 12px;
  flex: 1;
}

.risk-matrix-table th,
.risk-matrix-table td {
  border: 1px solid #ccc;
  padding: 6px 4px;
  text-align: center;
  font-weight: 600;
  min-width: 32px;
}

.risk-matrix-table th {
  background: #f8f9fa;
  color: #333;
  font-size: 10px;
  line-height: 1.2;
}

.risk-matrix-table th:first-child {
  background: #f8f9fa;
  color: #333;
  font-size: 10px;
  min-width: 80px;
}

/* Risk level colors */
.risk-matrix-table .unacceptable {
  background: #e53935;
  color: white;
}

.risk-matrix-table .tolerable-sma {
  background: #fff176;
  color: #333;
}

.risk-matrix-table .tolerable {
  background: #81c784;
  color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .risk-matrix-drawer {
    width: 100vw;
    right: -100vw;
  }
  
  .drawer-handle.open {
    right: 100vw;
  }
  
  .drawer-handle {
    padding: 8px 6px;
    min-height: 60px;
  }
  
  .handle-text {
    font-size: 10px;
  }
  
  .drawer-content {
    padding: 16px;
    font-size: 13px;
  }
  
  .severity-table,
  .probability-table {
    font-size: 12px;
  }
  
  .severity-table th,
  .severity-table td,
  .probability-table th,
  .probability-table td {
    padding: 6px 8px;
  }
  
  .risk-matrix-table {
    font-size: 11px;
  }
  
  .risk-matrix-table th,
  .risk-matrix-table td {
    padding: 4px 2px;
    min-width: 28px;
  }
}

/* Animation for smooth transitions */
@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.risk-matrix-drawer.open {
  animation: slideIn 0.3s ease;
}

.risk-matrix-drawer:not(.open) {
  animation: slideOut 0.3s ease;
} /* Structured Editor Styles */
/* Risk Resolution Matrix Drawer Styles */
/* Drawer Handle */
.drawer-handle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #2c3e50;
  color: white;
  padding: 12px 8px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 80px;
  justify-content: center;
}
.drawer-handle.open {
  right: 800px;
}
.drawer-handle:hover {
  background: #34495e;
  transform: translateY(-50%) translateX(-2px);
}
.drawer-handle.open {
  background: #e74c3c;
}
.drawer-handle.open:hover {
  background: #c0392b;
}
.handle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.handle-text {
  font-size: 11px;
  font-weight: 500;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  transform: rotate(180deg);
}
/* Drawer Container */
.risk-matrix-drawer {
  position: fixed;
  right: -800px;
  top: 0;
  width: 800px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.risk-matrix-drawer.open {
  right: 0;
}
/* Drawer Header */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}
.drawer-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}
.close-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-button:hover {
  background: #e9ecef;
  color: #333;
}
/* Drawer Content */
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 14px;
  line-height: 1.5;
}
.drawer-content h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-weight: 600;
  font-size: 1.2rem;
}
.drawer-content > div {
  margin-bottom: 32px;
}
/* Collapsible Sections */
.collapsible-section {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #dee2e6;
  min-height: 80px;
}
.section-header:hover {
  background: #e9ecef;
}
.section-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}
.expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: #666;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.expand-icon.expanded {
  transform: rotate(180deg);
}
.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.section-content.expanded {
  max-height: 1000px; /* Large enough to accommodate content */
  padding: 20px;
}
/* Tables */
.severity-table,
.probability-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}
.severity-table th,
.severity-table td,
.probability-table th,
.probability-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.severity-table th,
.probability-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}
.severity-table td:first-child,
.probability-table td:first-child {
  font-weight: 600;
  background: #f8f9fa;
  width: 120px;
}
/* Risk Matrix */
.matrix-section {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 20px;
  background: #f8f9fa;
}
.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.legend-color {
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
}
.legend-color.unacceptable {
  background: #e53935;
}
.legend-color.tolerable-sma {
  background: #fff176;
}
.legend-color.tolerable {
  background: #81c784;
}
.risk-matrix-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.matrix-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.frequency-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-weight: 600;
  font-size: 12px;
  color: #333;
  letter-spacing: 1px;
}
.risk-matrix-table {
  border-collapse: collapse;
  font-size: 12px;
  flex: 1;
}
.risk-matrix-table th,
.risk-matrix-table td {
  border: 1px solid #ccc;
  padding: 6px 4px;
  text-align: center;
  font-weight: 600;
  min-width: 32px;
}
.risk-matrix-table th {
  background: #f8f9fa;
  color: #333;
  font-size: 10px;
  line-height: 1.2;
}
.risk-matrix-table th:first-child {
  background: #f8f9fa;
  color: #333;
  font-size: 10px;
  min-width: 80px;
}
/* Risk level colors */
.risk-matrix-table .unacceptable {
  background: #e53935;
  color: white;
}
.risk-matrix-table .tolerable-sma {
  background: #fff176;
  color: #333;
}
.risk-matrix-table .tolerable {
  background: #81c784;
  color: #333;
}
/* Responsive Design */
@media (max-width: 768px) {
  .risk-matrix-drawer {
    width: 100vw;
    right: -100vw;
  }
  
  .drawer-handle.open {
    right: 100vw;
  }
  
  .drawer-handle {
    padding: 8px 6px;
    min-height: 60px;
  }
  
  .handle-text {
    font-size: 10px;
  }
  
  .drawer-content {
    padding: 16px;
    font-size: 13px;
  }
  
  .severity-table,
  .probability-table {
    font-size: 12px;
  }
  
  .severity-table th,
  .severity-table td,
  .probability-table th,
  .probability-table td {
    padding: 6px 8px;
  }
  
  .risk-matrix-table {
    font-size: 11px;
  }
  
  .risk-matrix-table th,
  .risk-matrix-table td {
    padding: 4px 2px;
    min-width: 28px;
  }
}
/* Animation for smooth transitions */
@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}
.risk-matrix-drawer.open {
  animation: slideIn 0.3s ease;
}
.risk-matrix-drawer:not(.open) {
  animation: slideOut 0.3s ease;
}
html, body, #root {
  height: 100%;
  margin: 0;
  padding: 0;
}
/* Split View Container */
.risk-editor-container {
  display: flex;
  height: calc(100vh - 120px); /* Account for header and status bar */
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.risk-detail-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 60px; /* Extra padding to account for status bar */
  background: #f9fafb;
}
/* Overview Mode */
.overview-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 60px; /* Extra padding to account for status bar */
}
.error-state {
  text-align: center;
  padding: 40px;
  color: #dc2626;
}
/* Simple page layout */
.page {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Fixed header */
.header {
  background-color: white;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header-content {
  width: 80%;
  max-width: 1000px;
  margin: 0 auto;
}
.buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
/* Save status styles */
.save-status {
  font-size: 0.9rem;
  color: #666;
}
.save-error {
  color: #f44336;
  font-weight: 500;
}
.pending-changes {
  color: #ff9800;
  font-weight: 500;
}
.text-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.5rem;
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
}
.save-button, .logout-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  margin-left: 0.5rem;
  cursor: pointer;
  font-weight: 500;
}
.save-button {
  background-color: #007bff;
  color: white;
}
.logout-button {
  background-color: #f0f0f0;
  color: #333;
}
.back-button {
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}
.back-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}
/* Scrollable content area - THE ONLY THING THAT SCROLLS */
.content {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  background-color: #f0f0f0;
}
/* Editor wrapper - centered with width constraints */
.editor-wrapper {
  width: 80%;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
}
/* Loading indicator */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 1.2rem;
  color: #666;
}
.risk-assessment-editor {
  width: 100%;
}
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
}
.form-section h3 {
  margin-bottom: 1rem;
  color: #333;
  font-weight: 600;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
}
.nested-form {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  background-color: #f9f9f9;
}
.risk-analysis-form h4, .remedial-measure-form h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}
.risk-assessment-matrix {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}
.risk-assessment-matrix h5 {
  margin-bottom: 0.75rem;
  color: #333;
}
.risk-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.risk-fields .form-group {
  flex: 1;
  min-width: 200px;
}
.risk-rating {
  background-color: #f0f0f0;
  font-weight: bold;
}
.risk-indicator {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
}
.risk-level-tolerable {
  background-color: #d4edda;
  color: #155724;
}
.risk-level-tolerable-with-approval {
  background-color: #fff3cd;
  color: #856404;
}
.risk-level-unacceptable {
  background-color: #dc3545;
  color: white;
}
.add-button, .remove-button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
.add-button {
  background-color: #4caf50;
  color: white;
  border: none;
  display: block;
  margin: 1rem 0;
}
.remove-button {
  background-color: #f44336;
  color: white;
  border: none;
  display: block;
  margin-top: 1rem;
}
.add-button:hover, .remove-button:hover {
  opacity: 0.9;
}
.revision-history-item {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.rating-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rating-value {
  font-weight: bold;
  min-width: 1.5rem;
  text-align: center;
}
.rating-label {
  color: #666;
  font-size: 0.875rem;
}
/* Meeting Integration Styles */
.meeting-integration-section {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}
.meeting-integration-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #333;
}
.meeting-form .form-row {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}
.meeting-form .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}
.meeting-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}
.join-meeting-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}
.join-meeting-button:hover:not(:disabled) {
  background-color: #0056b3;
}
.join-meeting-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}
.meeting-status {
  background-color: white;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.status-indicator {
  font-weight: 500;
  font-size: 0.9rem;
}
.meeting-url-display {
  font-size: 0.8rem;
  color: #666;
}
.stop-meeting-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.stop-meeting-button:hover {
  background-color: #c82333;
}
.transcription-preview {
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-radius: 4px;
  border-left: 3px solid #007bff;
}
.transcription-preview strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
}
.transcription-preview p {
  margin: 0;
  font-style: italic;
  color: #555;
  font-size: 0.9rem;
}
.meeting-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9rem;
}
/* Meeting status indicator */
.meeting-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f0f9ff;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #0369a1;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #dc2626;
}
.status-dot.connected {
  background-color: #22c55e;
  animation: pulse 2s infinite;
}
/* Visual Feedback for Voice Agent Edits */
/* Container with visual feedback */
.field-container {
  position: relative;
  transition: all 0.3s ease;
}
/* Voice agent editing indicator */
.field-container.voice-editing::before {
  content: "🤖 AI updating...";
  position: absolute;
  top: -20px;
  right: 0;
  font-size: 12px;
  color: #3b82f6;
  animation: pulse 1s infinite;
}
/* User lock indicator */
.field-container.user-locked::after {
  content: "🔒";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px;
  border-radius: 4px;
}
/* Flash animations for edits */
.field-container.voice-edited {
  animation: flash-blue 0.5s ease;
}
.field-container.user-edited {
  animation: flash-green 0.5s ease;
}
/* Flash animations */
@keyframes flash-blue {
  0%, 100% { 
    border-color: transparent; 
    box-shadow: none;
  }
  50% { 
    border-color: #3b82f6; 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }
}
@keyframes flash-green {
  0%, 100% { 
    border-color: transparent;
    box-shadow: none;
  }
  50% { 
    border-color: #10b981; 
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  }
}
/* Pulse animation for AI indicator */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
/* Apply field-container class to form groups for voice feedback */
.form-group.field-container {
  border: 2px solid transparent;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 6px;
}
/* Special styling for voice-locked textareas */
.field-container.voice-editing textarea,
.field-container.voice-editing input,
.field-container.voice-editing select {
  background-color: rgba(59, 130, 246, 0.05);
}
/* Special styling for user-locked textareas */
.field-container.user-locked textarea,
.field-container.user-locked input,
.field-container.user-locked select {
  background-color: rgba(156, 163, 175, 0.05);
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .form-section {
    padding: 1rem;
  }
  
  .nested-form {
    padding: 1rem;
  }
  
  .risk-fields {
    flex-direction: column;
  }
  
  .risk-fields .form-group {
    width: 100%;
  }

  .meeting-form .form-row {
    flex-direction: column;
  }

  .meeting-form .form-group {
    min-width: unset;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
