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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100dvh;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
}

.setup-intro {
  max-width: 480px;
  margin: 0 auto 1.25rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  line-height: 1.5;
}

.field-hint {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.2rem;
}

.credentials-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8rem;
}

.credentials-link a {
  color: #999;
  text-decoration: none;
}

.credentials-link a:hover {
  color: #555;
}

form {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
}

input[type="date"],
input[type="time"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fafafa;
  color: #1a1a1a;
  appearance: none;
}

input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus {
  outline: none;
  border-color: #4a90d9;
  background: #fff;
}

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

.quality-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quality-group input[type="radio"] {
  display: none;
}

.quality-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  background: #fafafa;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.quality-group input[type="radio"]:checked + label {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}

.checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkbox-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #4a90d9;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row label {
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
}

button[type="submit"] {
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

button[type="submit"]:hover {
  background: #357abd;
}

button[type="submit"]:active {
  background: #2868a0;
}

#status {
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.2em;
}

#status.success,
#status.error {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
}

#status.success { color: #2d7d46; background: #e6f4ea; }
#status.error   { color: #c0392b; background: #fbeae8; }
