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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f4f8;
  color: #222;
  -webkit-text-size-adjust: 100%;
}

.app-header {
  background: linear-gradient(135deg, #0056B3, #003d82);
  color: white;
  padding: 20px 16px 18px;
  text-align: center;
}

.app-header h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.obs-form {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.form-card {
  background: white;
  border-radius: 10px;
  margin: 0 12px 4px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,86,179,0.1);
}

.section-header {
  background: #0056B3;
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  margin: 16px 12px 0;
  border-radius: 10px 10px 0 0;
}

.field-group {
  margin-bottom: 14px;
}

.field-group:last-child { margin-bottom: 0; }

.field-group label, .field-label-bold {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #003d82;
  margin-bottom: 6px;
}

.field-label-bold { margin-bottom: 10px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

input[type=text],
input[type=date],
input[type=time],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #c8d9f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: #222;
  background: white;
  appearance: auto;
  -webkit-appearance: auto;
  transition: border-color 0.2s;
}

input[type=text]:focus,
input[type=date]:focus,
input[type=time]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0056B3;
  box-shadow: 0 0 0 3px rgba(0,86,179,0.12);
}

textarea { resize: vertical; min-height: 100px; }

/* Checkbox (Boots on Deck) */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-wrapper input[type=checkbox] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #0056B3;
}

.checkbox-label {
  font-size: 16px;
  font-weight: 600;
  color: #0056B3;
  cursor: pointer;
}

/* Location grid */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.loc-option input[type=radio] { display: none; }

.loc-option label {
  display: block;
  padding: 10px 12px;
  border: 2px solid #c8d9f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  background: white;
}

.loc-option input[type=radio]:checked + label {
  border-color: #0056B3;
  background: #0056B3;
  color: white;
  font-weight: 700;
}

#other-location-field label {
  font-size: 13px;
  font-weight: 600;
  color: #003d82;
  display: block;
  margin-bottom: 6px;
}

/* Check items (Behavior / Condition / Equipment) */
.check-list { }

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f9;
}

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

.check-label {
  flex: 1;
  font-size: 13px;
  color: #333;
  padding-right: 10px;
  line-height: 1.3;
}

.check-options {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.check-options input[type=radio] { display: none; }

.opt-safe, .opt-unsafe {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}

.opt-safe {
  border-color: #28a745;
  color: #28a745;
  background: white;
}

.opt-unsafe {
  border-color: #dc3545;
  color: #dc3545;
  background: white;
}

input[type=radio]:checked + .opt-safe {
  background: #28a745;
  color: white;
}

input[type=radio]:checked + .opt-unsafe {
  background: #dc3545;
  color: white;
}

/* Submit button */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #0056B3, #003d82);
  color: white;
  border: none;
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,86,179,0.35);
  transition: all 0.2s;
}

.btn-submit:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0,86,179,0.25);
}

@media (max-width: 380px) {
  .opt-safe, .opt-unsafe { padding: 6px 8px; font-size: 11px; }
  .check-label { font-size: 12px; }
  .location-grid { grid-template-columns: 1fr; }
}
