:root {
  --red: #CC0000;
  --black: #000000;
  --gray: #f5f5f5;
  --border: #ddd;
  --font: Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--black);
  background: #fff;
  padding: 0 0 60px 0;
}

header {
  background: var(--black);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

header img { height: 40px; }

header span {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.container { max-width: 720px; margin: 0 auto; padding: 24px 16px; }

h2 {
  font-size: 18px;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin: 24px 0 16px;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--black);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font);
  background: #fff;
}

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

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23666'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Multi-select checkboxes */
.multi-select { display: flex; flex-wrap: wrap; gap: 8px; }

.multi-select label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 13px;
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}

.multi-select input[type="checkbox"] { width: auto; margin: 0; }

/* Section selector */
.section-toggle {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}

.section-toggle-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--gray);
  font-weight: bold;
  font-size: 14px;
  user-select: none;
}

.section-toggle-header input[type="checkbox"] { width: auto; accent-color: var(--red); }

.section-toggle-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.section-toggle-body.open { display: block; }

/* Section header row with clear buttons */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 16px;
}

.section-header-row h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.clear-row {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-clear {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font);
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}

.btn-clear:hover {
  background: var(--gray);
  border-color: #aaa;
  color: var(--black);
}

/* Submit */
.submit-area { margin-top: 32px; text-align: center; }

button[type="submit"] {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px 40px;
  font-size: 16px;
  font-family: var(--font);
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  max-width: 360px;
}

button[type="submit"]:disabled {
  background: #999;
  cursor: not-allowed;
}

.status {
  margin-top: 16px;
  font-size: 14px;
  color: #555;
  text-align: center;
}

.status.error { color: var(--red); }

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 16px 12px; }
  button[type="submit"] { max-width: 100%; }
}
