:root {
  --header-blue: #4A90A4;
  --header-dark: #3A7084;
  --sidebar-bg: #F5F5F5;
  --sidebar-border: #E0E0E0;
  --content-bg: #FFFFFF;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-light: #DDDDDD;
  --error-color: #D32F2F;
  --success-color: #388E3C;
  --warning-color: #F57C00;
  --focus-blue: #1976D2;
  --button-primary: #4A90A4;
  --button-hover: #3A7084;
  --required-red: #D32F2F;
}

/* Service Status Indicator */
.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}

.status-indicator.service-up {
  background-color: #4caf50;
}

.status-indicator.service-down {
  background-color: #ccc;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--content-bg);
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
}

.header {
  background: linear-gradient(135deg, var(--header-blue) 0%, var(--header-dark) 100%);
  color: white;
  padding: 0;
  height: 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-title h1 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

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

.header-nav-item {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 3px;
  transition: background-color 0.2s;
  font-size: 13px;
}

.header-nav-item:hover {
  background-color: rgba(255,255,255,0.1);
}

.header-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.header-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.header-icon:hover {
  opacity: 1;
}

.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  overflow-y: auto;
  padding: 20px 0;
}

.sidebar-section {
  margin-bottom: 25px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu-item {
  display: block;
  padding: 10px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
  background-color: rgba(0,0,0,0.05);
}

.sidebar-menu-item.active {
  background-color: white;
  border-left-color: var(--header-blue);
  font-weight: 500;
}

.content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: var(--content-bg);
}

.content-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.content-title {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.content-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.form-section {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 25px;
  margin-bottom: 20px;
}

.form-section-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--required-red);
  margin-left: 2px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  background-color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--focus-blue);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-input.error,
.form-select.error {
  border-color: var(--error-color);
}

.form-input[readonly] {
  background-color: #F0F0F0;
  cursor: not-allowed;
}

.form-error {
  font-size: 12px;
  color: var(--error-color);
  margin-top: 5px;
  display: none;
}

.form-error.show {
  display: block;
}

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: var(--button-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary {
  background-color: white;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--sidebar-bg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background-color: #E8F5E9;
  color: var(--success-color);
  border: 1px solid #C8E6C9;
}

.alert-error {
  background-color: #FFEBEE;
  color: var(--error-color);
  border: 1px solid #FFCDD2;
}

.alert-warning {
  background-color: #FFF3E0;
  color: var(--warning-color);
  border: 1px solid #FFE0B2;
}

.questionnaire-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

.progress-bar {
  background-color: var(--sidebar-bg);
  border-radius: 20px;
  height: 8px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--header-blue) 0%, var(--focus-blue) 100%);
  height: 100%;
  border-radius: 20px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-step {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-step.active {
  color: var(--header-blue);
}

.question-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  max-width: 100%;
}

.question-number {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.radio-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.radio-option:hover {
  background-color: var(--sidebar-bg);
  border-color: var(--header-blue);
}

.radio-option.selected {
  background-color: #E3F2FD;
  border-color: var(--focus-blue);
}

.radio-input {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-label {
  flex: 1;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.status-panel {
  background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
  border: 1px solid #C8E6C9;
  border-radius: 4px;
  padding: 20px;
  margin-top: 30px;
}

.status-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--success-color);
  margin-bottom: 15px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.status-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--sidebar-bg);
  border-top-color: var(--header-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Enhanced questionnaire layout for better space utilization */
.questionnaire-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

.question-item {
  width: 100%;
  margin: 0 auto;
  max-width: none;
}

/* Ensure radio buttons stack vertically with proper spacing */
.radio-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  width: 100%;
}

.radio-option {
  display: flex !important;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.radio-option:hover {
  background-color: #f8f9fa;
  border-color: var(--header-blue);
  box-shadow: 0 2px 8px rgba(74,144,164,0.2);
  transform: translateY(-1px);
}

.radio-option.selected {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
  border-color: var(--header-blue);
  box-shadow: 0 3px 12px rgba(74,144,164,0.3);
  font-weight: 500;
}

.radio-input {
  margin-right: 12px !important;
  width: 16px !important;
  height: 16px !important;
  cursor: pointer;
  transform: scale(1.0) !important;
}

.radio-label {
  flex: 1;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Force radio options to match form inputs exactly - AGGRESSIVE OVERRIDE */
.radio-option,
.questionnaire-container .radio-option,
.question-container .radio-option,
div[id*="question"] .radio-option,
label.radio-option,
.radio-group .radio-option,
div .radio-option {
  padding: 8px 12px !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 3px !important;
  font-size: 14px !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
  flex-shrink: 1 !important;
  align-items: center !important;
  display: flex !important;
}

/* Compact spacing for better page utilization */
.question-number {
  margin-bottom: 5px;
  font-size: 11px;
}

.question-text {
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.3;
}

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

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 50px;
    height: calc(100vh - 50px);
    z-index: 999;
    transition: left 0.3s;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .content {
    padding: 20px;
  }
  
  .form-section {
    padding: 10px;
  }
  
  .question-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* Enhanced Radio Button Styles */
.enhanced-radio {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  margin: 5px 0;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
}

.enhanced-radio:hover {
  background-color: #f8f9fa;
  border-color: var(--button-primary);
}

.enhanced-radio.selected {
  background-color: #e3f2fd;
  border-color: var(--button-primary);
  border-width: 2px;
}

.enhanced-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-custom {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  margin-right: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.enhanced-radio:hover .radio-custom {
  border-color: var(--button-primary);
}

.enhanced-radio.selected .radio-custom {
  border-color: var(--button-primary);
  background-color: var(--button-primary);
}

.radio-mark {
  font-size: 14px;
  font-weight: bold;
  color: transparent;
  transition: all 0.2s ease;
}

.enhanced-radio.selected .radio-mark {
  color: white !important;
}

.radio-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.enhanced-radio.selected .radio-text {
  font-weight: 600;
  color: var(--button-primary);
}

/* Removed conflicting CSS rules - now consolidated above */