/*
  forms.css
  Styling for the F-03 registration form and general form controls,
  laid out like a structured data sheet (section labels, field groups)
  to echo the source Excel forms without literally copying them.
*/

.form-shell {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--line);
}

.form-shell__header {
  background: var(--navy-900);
  color: #fff;
  padding: 28px 34px;
}
.form-shell__header .eyebrow { color: var(--gold-400); margin-bottom: 8px; }
.form-shell__header h2 { color: #fff; font-size: 1.5rem; }
.form-shell__header p { color: rgba(255,255,255,0.68); margin-top: 8px; font-size: 0.92rem; }

.form-section {
  padding: 30px 34px;
  border-bottom: 1px solid var(--line);
}
.form-section:last-of-type { border-bottom: none; }

.form-section__label {
  font-family: var(--font-display);
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.form-section__label .form-section__code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--d9-purple-light);
  color: var(--d9-purple);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 22px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--navy-800);
}
.field .hint { font-size: 0.76rem; color: var(--ink-muted); }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.18);
  background: #fff;
}

.field textarea { resize: vertical; min-height: 90px; }

.field input[type="file"] {
  padding: 9px 12px;
  background: #fff;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  margin-right: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: #fff;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { background: var(--navy-700); }

/* --- Document list, used on the admin evaluate screen --- */
.document-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.document-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.document-list .doc-name { font-weight: 600; font-size: 0.88rem; }
.document-list .doc-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); }

.file-selected-list { margin-top: 8px; }
.file-selected-names { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.file-selected-names li {
  font-size: 0.83rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.file-selected-problems {
  background: #fdf3f3;
  border: 1px solid #f3c9c9;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--red-flag);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red-flag);
  background: #fdf3f3;
}
.field__error {
  font-size: 0.76rem;
  color: var(--red-flag);
  display: none;
}
.field.has-error .field__error { display: block; }

.radio-row, .checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.radio-row label, .checkbox-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 0.9rem; color: var(--ink); }

.form-shell__footer {
  padding: 26px 34px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.form-shell__footer .hint { max-width: 46ch; font-size: 0.8rem; }

.declaration-box {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* --- Score input used on the admin evaluate page (F-05 / F-06) --- */
.score-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.score-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
}
.score-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: middle;
}
.score-table tr.is-critical td:first-child::after {
  content: "critical";
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--red-flag);
  margin-left: 8px;
  border: 1px solid var(--red-flag);
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.score-table select {
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
}
.score-table .weighted-cell {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--navy-800);
}
