/* Compact Management application-form editor. */
body .applications-wrap > section.panel:last-child {
  width: min(100%, 1120px);
  margin: 20px auto 0 !important;
  padding: 24px;
}

body .question-editor { gap: 10px; }

body .question-card {
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 19, 32, .98), rgba(16, 32, 50, .88));
}

body .question-card > form:first-child {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr) minmax(130px, .65fr) minmax(125px, .55fr);
  gap: 10px 12px;
}

body .question-card > form:first-child > label.wide { grid-column: span 2; }
body .question-card > form:first-child > .question-checks {
  grid-column: auto;
  align-self: end;
  min-height: 39px;
  padding-bottom: 8px;
  gap: 10px;
}

body .question-card > form:first-child > .question-actions {
  grid-column: auto;
  align-self: end;
}

body .question-card > form:first-child > .question-actions button {
  min-height: 38px;
  white-space: nowrap;
}

body .question-card > form.question-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

body .question-card > form.question-actions .secondary { padding: 7px 10px; }

body .add-question {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.2fr) minmax(120px, .65fr) auto auto;
  gap: 12px;
  align-items: end;
}

body .add-question .check-label { min-height: 39px; white-space: nowrap; }
body .add-question button { width: auto; min-height: 39px; white-space: nowrap; }

@media (max-width: 1040px) {
  body .applications-wrap > section.panel:last-child { max-width: none; }
  body .question-card > form:first-child { grid-template-columns: 1fr 1fr; }
  body .question-card > form:first-child > label.wide { grid-column: auto; }
  body .question-card > form:first-child > .question-checks,
  body .question-card > form:first-child > .question-actions { grid-column: auto; }
  body .add-question { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 630px) {
  body .applications-wrap > section.panel:last-child { padding: 18px; }
  body .question-card { padding: 14px; }
  body .question-card > form:first-child,
  body .add-question { grid-template-columns: 1fr; }
  body .question-card > form:first-child > label.wide,
  body .question-card > form:first-child > .question-checks,
  body .question-card > form:first-child > .question-actions { grid-column: auto; }
  body .question-card > form:first-child > .question-actions button,
  body .add-question button { width: 100%; }
  body .question-card > form.question-actions { justify-content: stretch; }
  body .question-card > form.question-actions .secondary { width: 100%; }
}
