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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  line-height: 1.6;
}

.app {
  max-width: 100%;
  min-height: 100vh;
  background: white;
  margin: 0 auto;
}

.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.header h2 {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.9;
}

.submitter-dropdown-section {
  background: #e3f2fd;
  border-bottom: 2px solid #1e3c72;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submitter-dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e3c72;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.submitter-dropdown-title::before {
  content: "👤";
}

.submitter-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #1e3c72;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submitter-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
}

.submitter-info {
  margin-top: 8px;
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
}

.submitter-loading {
  color: #6c757d;
  font-style: italic;
  font-size: 12px;
}

.site-info-header {
  background: white;
  border-bottom: 2px solid #e9ecef;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-info-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e3c72;
  margin-bottom: 15px;
  text-align: center;
}

.site-info-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.site-info-row:last-child {
  margin-bottom: 0;
}

.site-info-item {
  flex: 1;
  min-width: 200px;
}

.site-info-item label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  font-size: 14px;
}

.site-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  height: 48px;
  box-sizing: border-box;
}

.site-input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.weather-display {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 14px;
}

.weather-loading {
  color: #6c757d;
  font-style: italic;
}

.weather-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weather-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #dee2e6;
}

.weather-section:last-child {
  border-bottom: none;
}

.weather-label {
  font-weight: 600;
  color: #495057;
  font-size: 12px;
}

.weather-value {
  font-weight: 700;
  color: #1e3c72;
  font-size: 12px;
}

.weather-value.high-temp {
  color: #dc3545;
}

.weather-value.rain {
  color: #007bff;
}

.weather-error {
  color: #dc3545;
  font-size: 12px;
  font-style: italic;
}

.form-container {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  counter-reset: section-counter;
}

.section {
  margin-bottom: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.section-header {
  background: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 2px solid #e9ecef;
  font-weight: 700;
  font-size: 16px;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.section-header::before {
  content: counter(section-counter);
  counter-increment: section-counter;
  background: #6c757d;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.section.completed .section-header::before {
  background: #28a745;
  content: "✓";
}

.section-header-title {
  flex: 1;
}

.section-completion {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.section.completed .section-completion {
  color: #28a745;
}

.checklist-item {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.checklist-item:last-child {
  border-bottom: none;
}

.item-question {
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  font-size: 15px;
}

.radio-group {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 80px;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
}

.radio-option:hover {
  border-color: #1e3c72;
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.radio-option:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.radio-option.selected {
  border-color: #1e3c72;
  background: #e3f2fd;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.2);
}

.radio-option.selected.yes {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.radio-option.selected.no {
  border-color: #dc3545;
  background: #f8d7da;
  color: #721c24;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.radio-option.selected.na {
  border-color: #ffc107;
  background: #fff3cd;
  color: #856404;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #1e3c72;
  margin: 0;
}

.radio-option label {
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  margin: 0;
}

.comment-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
  margin-top: 10px;
  display: none;
}

.comment-input.show {
  display: block;
}

.comment-input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.attendees-section {
  margin-top: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.attendee-item {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.attendee-item:last-child {
  border-bottom: none;
}

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

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  height: 22px;
  line-height: 22px;
}

.name-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  height: 48px;
  box-sizing: border-box;
}

.name-input:focus {
  outline: none;
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.signature-section {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
}

.signature-section-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: transparent;
  font-size: 14px;
  height: 22px;
  line-height: 22px;
  user-select: none;
}

.signature-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 2px solid #1e3c72;
  border-radius: 6px;
  background: #1e3c72;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  justify-content: center;
  box-sizing: border-box;
}

.signature-button:hover {
  background: #2a5298;
  border-color: #2a5298;
}

.signature-image {
  width: 100%;
  height: 48px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  object-fit: contain;
  padding: 4px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.signature-image:hover {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.add-attendee-container {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.add-attendee-container .btn {
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.signature-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.signature-modal.show {
  display: flex;
}

.signature-modal-content {
  background: white;
  width: 95%;
  height: 95%;
  max-width: 800px;
  max-height: 600px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.signature-modal-header {
  padding: 20px;
  background: #1e3c72;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.signature-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature-modal-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.signature-instructions {
  text-align: center;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
  flex-shrink: 0;
}

.modal-signature-pad {
  flex: 1;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 20px;
  min-height: 200px;
  overflow: hidden;
}

.modal-signature-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.signature-modal-footer {
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  border-top: 1px solid #e9ecef;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: #1e3c72;
  color: white;
}

.btn-primary:hover {
  background: #2a5298;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-success {
  background: #28a745;
  color: white;
  width: 100%;
  min-width: 200px;
}

.btn-success:hover {
  background: #218838;
}

.btn-outline {
  background: transparent;
  color: #1e3c72;
  border: 2px solid #1e3c72;
}

.btn-outline:hover {
  background: #1e3c72;
  color: white;
}

.file-upload-section {
  margin-bottom: 15px;
}

.file-input {
  display: none;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid #1e3c72;
  border-radius: 6px;
  background: #1e3c72;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.file-upload-button:hover {
  background: #2a5298;
  border-color: #2a5298;
}

.file-preview {
  margin-top: 10px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-top: 10px;
}

.file-info-text {
  flex: 1;
  font-size: 14px;
  color: #495057;
}

.file-remove {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.submit-container {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
}

.success-message {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #c3e6cb;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.success-message::before {
  content: "✓";
  background: #28a745;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.error-message {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-message::before {
  content: "⚠";
  background: #dc3545;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.error-message ul {
  margin: 10px 0 0 20px;
  list-style-type: disc;
}

.error-message li {
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .form-container {
    padding: 15px;
  }

  .header {
    padding: 15px;
  }

  .header h1 {
    font-size: 20px;
  }

  .header h2 {
    font-size: 16px;
  }

  .submitter-dropdown-section {
    padding: 12px 15px;
  }

  .site-info-header {
    padding: 15px;
  }

  .site-info-row {
    flex-direction: column;
    gap: 15px;
  }

  .site-info-item {
    min-width: auto;
  }

  .weather-display {
    min-height: 60px;
    font-size: 12px;
  }

  .weather-section {
    padding: 4px 0;
  }

  .weather-label,
  .weather-value {
    font-size: 11px;
  }

  .radio-group {
    gap: 8px;
    justify-content: space-between;
  }

  .radio-option {
    flex: 1;
    min-width: 60px;
    padding: 10px 8px;
    justify-content: center;
    font-size: 14px;
  }

  .radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
  }

  .radio-option label {
    font-size: 13px;
  }

  .attendee-item {
    padding: 15px;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .signature-section {
    width: 120px;
    flex-shrink: 0;
  }

  .signature-section-label {
    color: transparent;
    font-size: 12px;
    height: 18px;
    line-height: 18px;
    margin-bottom: 6px;
  }

  .signature-button {
    padding: 0 8px;
    font-size: 14px;
    height: 48px;
  }

  .signature-button svg {
    width: 16px;
    height: 16px;
  }

  .signature-image {
    height: 48px;
  }

  .input-group {
    margin-bottom: 0;
  }

  .input-group label {
    height: 18px;
    line-height: 18px;
    margin-bottom: 6px;
    font-size: 12px;
  }

  .signature-modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  
  .signature-modal-footer {
    flex-direction: column;
  }
  
  .signature-modal-footer .btn {
    width: 100%;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
    min-height: 48px;
    font-size: 16px;
  }

  .btn:last-child {
    margin-bottom: 0;
  }

  .comment-input {
    min-height: 100px;
  }

  .name-input {
    font-size: 16px;
  }

  .modal-signature-canvas {
    touch-action: none;
  }

  .add-attendee-container {
    padding: 15px;
  }

  .add-attendee-container .btn {
    width: 100%;
    min-width: auto;
    font-size: 16px;
    padding: 12px 16px;
  }
}
