/* Shared compact control density for the authenticated application. */
body.app-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.app-shell select,
body.app-shell button,
body.app-shell input[type="button"],
body.app-shell input[type="submit"],
body.app-shell input[type="reset"] {
  box-sizing: border-box;
  min-height: 36px !important;
  padding: 6px 10px !important;
  line-height: 1.2;
}

body.app-shell textarea {
  box-sizing: border-box;
  min-height: 72px !important;
  padding: 7px 10px !important;
  line-height: 1.3;
}

/* Keep compact controls readable while avoiding the tall row gaps produced by
   legacy table-based forms. */
body.app-shell .search-panel__table,
body.app-shell .formtable,
body.app-shell form > table {
  border-spacing: 6px 3px;
}

body.app-shell form > table td,
body.app-shell .form-row,
body.app-shell .form-group {
  padding-top: 3px;
  padding-bottom: 3px;
}

/* Shared action rows should contract with the controls they contain. */
body.app-shell .form-actions,
body.app-shell .search-panel__actions,
body.app-shell .form-action-row {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Preserve the visible keyboard target and focus treatment after compaction. */
body.app-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus-visible,
body.app-shell select:focus-visible,
body.app-shell textarea:focus-visible,
body.app-shell button:focus-visible,
body.app-shell input[type="button"]:focus-visible,
body.app-shell input[type="submit"]:focus-visible,
body.app-shell input[type="reset"]:focus-visible {
  outline: 3px solid #65a98b;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  body.app-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  body.app-shell select,
  body.app-shell button,
  body.app-shell input[type="button"],
  body.app-shell input[type="submit"],
  body.app-shell input[type="reset"] {
    min-height: 40px !important;
  }
}
